mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix a silly bug where MAXPATHLEN was subtracted from the string length rather
than the other way around! Submitted by: Elmar Bartel <bartel@informatik.tu-muenchen.de>
This commit is contained in:
parent
adc1189458
commit
abdec3e35c
1 changed files with 2 additions and 2 deletions
|
|
@ -539,8 +539,8 @@ rawname(cp)
|
|||
*dp = '\0';
|
||||
(void)strncpy(rawbuf, cp, MAXPATHLEN - 1);
|
||||
*dp = '/';
|
||||
(void)strncat(rawbuf, "/r", strlen(rawbuf) - (MAXPATHLEN - 1));
|
||||
(void)strncat(rawbuf, dp + 1, strlen(rawbuf) - (MAXPATHLEN - 1));
|
||||
(void)strncat(rawbuf, "/r", MAXPATHLEN-1 - strlen(rawbuf));
|
||||
(void)strncat(rawbuf, dp + 1, MAXPATHLEN-1 - strlen(rawbuf));
|
||||
return (rawbuf);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue