0064-ps/sortformat.c: Double-check chars in verify_short_sort().
To avoid an out-of-bounds access at checkoff[tmp]. The strspn() at the beginning of the function protects against it already, but double-check this in case of some future change.
This commit is contained in:
parent
7bd4f0b6d7
commit
aad2b13690
@ -427,6 +427,7 @@ static const char *verify_short_sort(const char *arg){
|
||||
walk = arg;
|
||||
for(;;){
|
||||
tmp = *walk;
|
||||
if(tmp < 0 || (size_t)tmp >= sizeof(checkoff)) return _("bad sorting code");
|
||||
switch(tmp){
|
||||
case '\0':
|
||||
return NULL; /* looks good */
|
||||
|
Loading…
Reference in New Issue
Block a user