mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
null term?
This commit is contained in:
parent
ec7ab1a4ed
commit
853d2e14e6
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ void jsonp_error_set_source(json_error_t *error, const char *source) {
|
||||||
|
|
||||||
length = strlen(source);
|
length = strlen(source);
|
||||||
if (length < JSON_ERROR_SOURCE_LENGTH) {
|
if (length < JSON_ERROR_SOURCE_LENGTH) {
|
||||||
strncpy(error->source, source, JSON_ERROR_SOURCE_LENGTH);
|
strncpy(error->source, source, JSON_ERROR_SOURCE_LENGTH - 1);
|
||||||
} else {
|
} else {
|
||||||
size_t extra = length - JSON_ERROR_SOURCE_LENGTH + 4;
|
size_t extra = length - JSON_ERROR_SOURCE_LENGTH + 4;
|
||||||
memcpy(error->source, "...", 3);
|
memcpy(error->source, "...", 3);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue