EtchedPixels / FUZIX

FuzixOS: Because Small Is Beautiful
Other
2.13k stars 267 forks source link

Truncate input values to their lengths #1056

Closed veremenko-y closed 3 months ago

veremenko-y commented 3 months ago

Truncate input values in makeversion.c. This prevents broken output of uname if values with exceeding length are suplied.

EtchedPixels commented 3 months ago

How are we getting broken lengths in the first place is my question ?

veremenko-y commented 3 months ago

I came across it when I tried adding timestamp to the kernel build, so I can track when last I compiled the kernel on the PI. As of now I don't think there's any code path that hits it. Feel free to close it at your discretion.

EtchedPixels commented 3 months ago

Ok probably better to do something in kernel/start.c lilke

ifdef KERNEL_PRINT_ID

  kputs(KERNEL_PRINT_ID);

endif