Making it happen
scanf_s security enhancements
My friend Adrian points me to scanf_s that is not usable just by simple replacing scanf( src, “%s”, dest) with scanf_s but you also have to add an additional parameter for every string or character read, specifying the buffer size. For example, if dest was char dest[10] you’d have to write scanf_s( src, “%s”, dest, 10), otherwise an access violation will occur.
| Print article | This entry was posted by andrei on October 30, 2007 at 10:14 am, and is filed under Uncategorized. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
