Opened 11 years ago
Closed 11 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 |
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)
by , 11 years ago
Attachment: | 0001-Fixed-possible-not-null-termined-strings.patch added |
---|
comment:1 by , 11 years ago
patch: | 0 → 1 |
---|
follow-up: 3 comment:2 by , 11 years ago
by , 11 years ago
Attachment: | 0001-Fixed-possible-bug-resulting-in-not-null-terminated-.patch added |
---|
Note:
See TracTickets
for help on using tickets.
The preferred solution would be to simply use
strlcpy()
instead ofstrncpy()
.BTW,
NULL
is the null pointer. For the nul character'\0'
should be used.