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
2354de18fe
commit
6131a2e28e
@ -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…
x
Reference in New Issue
Block a user