Opened 7 years ago

Closed 7 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:
Platform: All


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, 7 years ago

patch: 01

comment:2 by bonefish, 7 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, 7 years ago

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

comment:4 by bonefish, 7 years ago

Resolution: fixed
Status: newclosed

Thanks! Applied in hrev46395.

Note: See TracTickets for help on using tickets.