pmap fix by Jim
This commit is contained in:
parent
203dbbe482
commit
9acfb07b23
@ -61,7 +61,7 @@ pgrep.c:558: data_index: Using tainted variable "(int)argv[1][1]" as an index to
|
|||||||
Error: EVALUATION_ORDER:
|
Error: EVALUATION_ORDER:
|
||||||
agree that there is a problem.
|
agree that there is a problem.
|
||||||
moreover, it deals with an undocumented command line argument (but sami has documentation addition pending)
|
moreover, it deals with an undocumented command line argument (but sami has documentation addition pending)
|
||||||
a deference was added in line with intent, hopefully avoids this warning
|
the logic was altered in line with intent, hopefully avoids this warning
|
||||||
my_category: defect_was_fixed
|
my_category: defect_was_fixed
|
||||||
pmap.c:314: write_write_order: In "arg2 = (arg2 ? arg2++ : arg1)", "arg2" is written in "arg2" (the assignment left-hand side) and written in "arg2 ? arg2++ : arg1" but the order in which the side effects take place is undefined because there is no intervening sequence point.
|
pmap.c:314: write_write_order: In "arg2 = (arg2 ? arg2++ : arg1)", "arg2" is written in "arg2" (the assignment left-hand side) and written in "arg2 ? arg2++ : arg1" but the order in which the side effects take place is undefined because there is no intervening sequence point.
|
||||||
|
|
||||||
|
3
pmap.c
3
pmap.c
@ -311,7 +311,8 @@ int main(int argc, char *argv[]){
|
|||||||
char *arg2 = strchr(arg1,',');
|
char *arg2 = strchr(arg1,',');
|
||||||
if(arg2)
|
if(arg2)
|
||||||
*arg2 = '\0';
|
*arg2 = '\0';
|
||||||
arg2 = *arg2 ? arg2++ : arg1;
|
if(arg2) ++arg2;
|
||||||
|
else arg2 = arg1;
|
||||||
|
|
||||||
if(*arg1)
|
if(*arg1)
|
||||||
range_low = STRTOUKL(arg1,&arg1,16);
|
range_low = STRTOUKL(arg1,&arg1,16);
|
||||||
|
Loading…
Reference in New Issue
Block a user