add guard logic to check sizeof(value) is sufficient (should be -- size is 20, needed are 5, but still the new code is strictly safer even if slower)
This commit is contained in:
parent
91ef87a804
commit
01e8e930dc
@ -366,11 +366,13 @@ conv_cancel (enum TALER_BANK_Direction direction)
|
|||||||
|
|
||||||
if (TALER_BANK_DIRECTION_CANCEL ==
|
if (TALER_BANK_DIRECTION_CANCEL ==
|
||||||
(TALER_BANK_DIRECTION_CANCEL & direction))
|
(TALER_BANK_DIRECTION_CANCEL & direction))
|
||||||
strcpy (&ret.value[0],
|
GNUNET_snprintf (ret.value,
|
||||||
"show");
|
sizeof (ret.value),
|
||||||
|
"show");
|
||||||
else
|
else
|
||||||
strcpy (&ret.value[0],
|
GNUNET_snprintf (ret.value,
|
||||||
"omit");
|
sizeof (ret.value),
|
||||||
|
"omit");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user