Opened 6 years ago

Closed 6 years ago

#10223 closed bug (fixed)

Fixed possibly not null-terminated strings

Reported by: Ezodev Owned by: nobody
Priority: normal Milestone: R1
Component: - General Version: R1/Development
Keywords: gci2013 coverity Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

If source strings are wrong, this strings will be not null-terminated. I dont know what are this source strings, but this code willn't affect execution speed and will shut-up programs for static analysis.

Attachments (2)

Change History (6)

comment:1 by Ezodev, 6 years ago

Has a Patch: set

comment:2 by bonefish, 6 years ago

The preferred solution would be to simply use strlcpy() instead of strncpy().

BTW, NULL is the null pointer. For the nul character '\0' should be used.

in reply to:  2 comment:3 by Ezodev, 6 years ago

Okay, I changed it. I've never heard of this function before.

comment:4 by bonefish, 6 years ago

Resolution: fixed
Status: newclosed

Thanks! Applied in hrev46395.

Note: See TracTickets for help on using tickets.