fix buffer length for printing DFs
This commit is contained in:
parent
b59456b6e4
commit
1cc6087126
@ -422,7 +422,7 @@ int sc_path_print(char *buf, size_t buflen, const sc_path_t *path)
|
|||||||
if (buf == NULL || path == NULL)
|
if (buf == NULL || path == NULL)
|
||||||
return SC_ERROR_INVALID_ARGUMENTS;
|
return SC_ERROR_INVALID_ARGUMENTS;
|
||||||
|
|
||||||
if (buflen < path->len * 2 + path->aid.len * 2 + 1)
|
if (buflen < path->len * 2 + path->aid.len * 2 + 3)
|
||||||
return SC_ERROR_BUFFER_TOO_SMALL;
|
return SC_ERROR_BUFFER_TOO_SMALL;
|
||||||
|
|
||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user