[PATCH 0/1] replace snprintf with scnprintf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Steve,

Please find a trivial patch that replaces all use of snprintf with scnprintf.
scnprintf() is generally seen as a safer function to use than snprintf for many use cases.


In our case, there is no actual difference between the two since we never look at the return value.
Thus we did not have any of the bugs that scnprintf protects against and the patch does nothing.


However, for people reading our code it will be a receipt that we have done our due dilligence and checked our code for
this type of bugs.


See the presentation "Making C Less Dangerous In The Linux Kernel" at this years LCA. Lots of good stuff.





[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux