mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 06:15:33 -04:00
In case of ENCODING_8BIT the EOF code will be pass to putchar.
EOF check should be done before (uint8_t)c > 127 test. Reported by: cem
This commit is contained in:
parent
3ace9199b4
commit
1194c3cb57
1 changed files with 2 additions and 2 deletions
|
|
@ -402,13 +402,13 @@ find_strings(const char *name, FILE *pfile, off_t offset, off_t size)
|
|||
break;
|
||||
c = getcharacter(pfile);
|
||||
cur_off += encoding_size;
|
||||
if (!PRINTABLE(c) || c == EOF)
|
||||
break;
|
||||
if (encoding == ENCODING_8BIT &&
|
||||
(uint8_t)c > 127) {
|
||||
putchar(c);
|
||||
continue;
|
||||
}
|
||||
if (!PRINTABLE(c) || c == EOF)
|
||||
break;
|
||||
putchar(c);
|
||||
}
|
||||
putchar('\n');
|
||||
|
|
|
|||
Loading…
Reference in a new issue