mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-17 16:44:27 -04:00
[misc] fix some Coverity warnings
This commit is contained in:
parent
436584fcc0
commit
8538ce0590
7 changed files with 14 additions and 9 deletions
|
@ -283,6 +283,7 @@ BOOL get_supported_locales(const char* filename)
|
|||
if ((line[i] != 'l') && (line[i] != 'v') && (line[i] != 'a'))
|
||||
continue;
|
||||
// line[i] is not NUL so i+1 is safe to access
|
||||
// coverity[tainted_data]
|
||||
lcmd = get_loc_cmd(line[i], &line[i+1]);
|
||||
if ((lcmd == NULL) || ((lcmd->command != LC_LOCALE) && (lcmd->command != LC_VERSION) && (lcmd->command != LC_ATTRIBUTES))) {
|
||||
free_loc_cmd(lcmd);
|
||||
|
@ -446,6 +447,7 @@ BOOL get_loc_data_file(const char* filename, loc_cmd* lcmd)
|
|||
buf[i] = 0;
|
||||
if (!eol)
|
||||
loc_line_nr += line_nr_incr;
|
||||
// coverity[tainted_data]
|
||||
get_loc_data_line(buf);
|
||||
break;
|
||||
case '\r':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue