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,10 +366,12 @@ conv_cancel (enum TALER_BANK_Direction direction)
|
||||
|
||||
if (TALER_BANK_DIRECTION_CANCEL ==
|
||||
(TALER_BANK_DIRECTION_CANCEL & direction))
|
||||
strcpy (&ret.value[0],
|
||||
GNUNET_snprintf (ret.value,
|
||||
sizeof (ret.value),
|
||||
"show");
|
||||
else
|
||||
strcpy (&ret.value[0],
|
||||
GNUNET_snprintf (ret.value,
|
||||
sizeof (ret.value),
|
||||
"omit");
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user