Menu

#16 masq_info.c: 2 * no checking of input word size ?

BETA-1.65-UPSTREAM
closed-fixed
nobody
None
5
2021-01-04
2014-04-10
dcb
No

1.

[masq_info.c:99]: (warning) scanf without field width limits can crash with huge input data.

   if ((n = fscanf(f, " %s %lX:%hX %lX:%hX %hX %lX %hd %hd %lu",
            buf,

Suggest better code

   if ((n = fscanf(f, " %256s %lX:%hX %lX:%hX %hX %lX %hd %hd %lu",
            buf,

2.

[masq_info.c:107]: (warning) scanf without field width limits can crash with huge input data.

Duplicate.

Discussion

  • Mike Frysinger

    Mike Frysinger - 2021-01-04

    should be fixed by 839f7607ba1363b126d978084fec08c7c3c03c50 i think

     
  • Mike Frysinger

    Mike Frysinger - 2021-01-04
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     1.
    
     [masq_info.c:99]: (warning) scanf without field width limits can crash with huge input data.
    
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.
Try Free →