Project

General

Custom queries

Profile

Actions

Bug #7420

closed

detect-engine: warning fgets could get negative value

Added by Shivani Bhardwaj 6 months ago. Updated 5 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

fgets sees:

In file included from /usr/include/stdio.h:970,
                 from suricata-common.h:64,
                 from detect-engine-loader.c:24:
In function 'fgets',
    inlined from 'DetectLoadSigFile' at detect-engine-loader.c:134:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:313:12: warning: argument 2 value -1 is negative [-Wstringop-overflow=]
  313 |     return __fgets_alias (__s, __n, __stream);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/features.h:510,
                 from /usr/include/dirent.h:25,
                 from suricata-common.h:60:
/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h: In function 'DetectLoadSigFile':
/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h:96:14: note: in a call to function '__fgets_alias' declared with attribute 'access (write_only, 1, 2)'
   96 | extern char *__REDIRECT (__fgets_alias,
      |              ^~~~~~~~~~
#1

Updated by Shivani Bhardwaj 6 months ago

  • Subject changed from scan-build: fgets could get negative value to detect-engine: scan-build warning fgets could get negative value
#2

Updated by Shivani Bhardwaj 4 months ago

  • Subject changed from detect-engine: scan-build warning fgets could get negative value to detect-engine: warning fgets could get negative value
#3

Updated by Victor Julien 3 months ago

  • Target version changed from 8.0.0-beta1 to 8.0.0-rc1
#4

Updated by Shivani Bhardwaj 5 days ago

  • Status changed from Assigned to Closed
  • Assignee changed from Shivani Bhardwaj to Victor Julien
Actions

Also available in: Atom PDF