PPRuNe Forums - View Single Post - A Boeing Code Leak Exposes Security Flaws Deep in a 787's Guts
Old 8th Aug 2019, 15:41
  #12 (permalink)  
a_q
 
Join Date: Mar 2015
Location: uk
Posts: 16
Likes: 0
Received 0 Likes on 0 Posts
"sprintf" is NOT an unexploitable function - it can (and has in the past) been used as an exploit for buffer overruns.

By contrast, "snprintf" (note the extra 'n') is MUCH safer, the 'n' being a buffer limit length set by the programmer.

Also it beggars belief that they allow "sprintf" in their coding standard, we use "snprintf" and similar exclusively, to cut down on the possibility of bugs and exploits, and it's usual practice these days for C programmers in industry.

Last edited by a_q; 8th Aug 2019 at 15:44. Reason: add more detail
a_q is offline