mirror of
https://github.com/opnsense/src.git
synced 2026-04-26 08:37:50 -04:00
Avoid wandering over the beginning of the actual buffer
if the passed template string contains only 'X' characters. Submitted by: Mark Andrews <marka@isc.org> (patch modified) PR: 38402
This commit is contained in:
parent
0bf831c43e
commit
ccccc4e1c3
1 changed files with 1 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ _gettemp(path, doopen, domkdir, slen)
|
|||
}
|
||||
|
||||
/* Fill space with random characters */
|
||||
while (*trv == 'X') {
|
||||
while (trv >= path && *trv == 'X') {
|
||||
rand = arc4random() % (sizeof(padchar) - 1);
|
||||
*trv-- = padchar[rand];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue