summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6a2bd85)
* Fix format-truncation warning, missing string.h inclusion and strnlen warning
* Dynamic string width field
// asn.1 dumping
//-----------------------------------------------------------------------------
// asn.1 dumping
//-----------------------------------------------------------------------------
+#define _POSIX_C_SOURCE 200809L // need for strnlen()
+
#include "asn1dump.h"
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include "asn1dump.h"
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <jansson.h>
#include <mbedtls/asn1.h>
#include <mbedtls/oid.h>
#include <jansson.h>
#include <mbedtls/asn1.h>
#include <mbedtls/oid.h>
}
PrintAndLog(buffer2);
} else {
}
PrintAndLog(buffer2);
} else {
- snprintf(buffer2, sizeof(buffer2), "%s%s", prefix, buffer);
+ snprintf(buffer2, sizeof(buffer2), "%s%.*s", prefix, MAX_PRINT_BUFFER - 20, buffer);
PrintAndLog(buffer2);
}
}
PrintAndLog(buffer2);
}
}