[Freeciv-tickets] [freeciv] #45822: savegame?.c: strlen(NULL)

Back to archive index
OSDN Ticket System norep****@osdn*****
Tue Oct 11 03:23:42 JST 2022


#45822: savegame?.c: strlen(NULL)

  Open Date: 2022-10-10 20:47
Last Update: 2022-10-10 21:23

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/45822
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45822

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-10-10 21:23 Updated by: cazfi

Comment:

Reply To cazfi
I assume these to be some common pattern to be fixed as one bug.
The pattern is that there's a sg_failure_ret() macro checking that the string is not NULL, and then separate sg_failure_ret() macro using strlen() to check its length. Seems correct to me, i.e., the report to be a false positive.

---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: (None)
          Type: Bugs
        Status: Open
      Priority: 5 - Medium
     MileStone: (None)
     Component: Server
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Clang analyzer gives some warnings about strlen() being called with NULL string in savegame2.c and savegame3.c. I assume these to be some common pattern to be fixed as one bug.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/45822
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45822



More information about the Freeciv-tickets mailing list
Back to archive index