Skip to content

Commit

Permalink
ICU-22251 Move sprintf to snprintf.
Browse files Browse the repository at this point in the history
See #2291
  • Loading branch information
FrankYFTang authored and sffc committed Feb 10, 2023
1 parent b871844 commit ec2d4b3
Show file tree
Hide file tree
Showing 70 changed files with 298 additions and 292 deletions.
8 changes: 4 additions & 4 deletions icu4c/source/common/putil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ static void U_CALLCONV dataDirectoryInitFn() {
# endif
# if defined(ICU_DATA_DIR_PREFIX_ENV_VAR)
if (prefix != NULL) {
snprintf(datadir_path_buffer, PATH_MAX, "%s%s", prefix, path);
snprintf(datadir_path_buffer, sizeof(datadir_path_buffer), "%s%s", prefix, path);
path=datadir_path_buffer;
}
# endif
Expand Down Expand Up @@ -1553,7 +1553,7 @@ static void U_CALLCONV TimeZoneDataDirInitFn(UErrorCode &status) {

#if defined(ICU_TIMEZONE_FILES_DIR_PREFIX_ENV_VAR)
if (prefix != NULL) {
snprintf(timezonefilesdir_path_buffer, PATH_MAX, "%s%s", prefix, dir);
snprintf(timezonefilesdir_path_buffer, sizeof(timezonefilesdir_path_buffer), "%s%s", prefix, dir);
dir = timezonefilesdir_path_buffer;
}
#endif
Expand Down Expand Up @@ -2124,7 +2124,7 @@ int_getDefaultCodepage()
}
/* else use the default */
}
sprintf(codepage,"ibm-%d", ccsid);
snprintf(codepage, sizeof(codepage), "ibm-%d", ccsid);
return codepage;

#elif U_PLATFORM == U_PF_OS390
Expand Down Expand Up @@ -2161,7 +2161,7 @@ int_getDefaultCodepage()
// are between 3 and 19999
if (codepageNumber > 0 && codepageNumber < 20000)
{
sprintf(codepage, "windows-%ld", codepageNumber);
snprintf(codepage, sizeof(codepage), "windows-%ld", codepageNumber);
return codepage;
}
// If the codepage number call failed then return UTF-8
Expand Down
2 changes: 1 addition & 1 deletion icu4c/source/common/wintz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ uprv_detectWindowsTimeZone()
//
// For example, a time zone that is 3 hours ahead of UTC (UTC+03:00) would have a Bias value of -180, and the
// corresponding time zone ID would be "Etc/GMT-3". (So there is no need to negate utcOffsetMins below.)
int ret = snprintf(gmtOffsetTz, UPRV_LENGTHOF(gmtOffsetTz), "Etc/GMT%+ld", utcOffsetMins / 60);
int ret = snprintf(gmtOffsetTz, sizeof(gmtOffsetTz), "Etc/GMT%+ld", utcOffsetMins / 60);
if (ret > 0 && ret < UPRV_LENGTHOF(gmtOffsetTz)) {
return uprv_strdup(gmtOffsetTz);
}
Expand Down
4 changes: 2 additions & 2 deletions icu4c/source/extra/uconv/uconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ ConvertFile::convertFile(const char *pname,
// length of the just consumed bytes -
// length of the error bytes
length =
(int8_t)sprintf(pos, "%d",
(int8_t)snprintf(pos, sizeof(pos), "%d",
(int)(infoffset + (cbufp - buf) - errorLength));

// output the bytes that caused the error
Expand Down Expand Up @@ -985,7 +985,7 @@ ConvertFile::convertFile(const char *pname,
errtag = "problemCvtFromUOut";
}

length = (int8_t)sprintf(pos, "%u", (int)ferroffset);
length = (int8_t)snprintf(pos, sizeof(pos), "%u", (int)ferroffset);

// output the code points that caused the error
UnicodeString str;
Expand Down
6 changes: 3 additions & 3 deletions icu4c/source/i18n/astro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,7 @@ UnicodeString CalendarAstronomer::Ecliptic::toString() const
{
#ifdef U_DEBUG_ASTRO
char tmp[800];
sprintf(tmp, "[%.5f,%.5f]", longitude*RAD_DEG, latitude*RAD_DEG);
snprintf(tmp, sizeof(tmp), "[%.5f,%.5f]", longitude*RAD_DEG, latitude*RAD_DEG);
return UnicodeString(tmp, "");
#else
return UnicodeString();
Expand All @@ -1492,7 +1492,7 @@ UnicodeString CalendarAstronomer::Equatorial::toString() const
{
#ifdef U_DEBUG_ASTRO
char tmp[400];
sprintf(tmp, "%f,%f",
snprintf(tmp, sizeof(tmp), "%f,%f",
(ascension*RAD_DEG), (declination*RAD_DEG));
return UnicodeString(tmp, "");
#else
Expand All @@ -1504,7 +1504,7 @@ UnicodeString CalendarAstronomer::Horizon::toString() const
{
#ifdef U_DEBUG_ASTRO
char tmp[800];
sprintf(tmp, "[%.5f,%.5f]", altitude*RAD_DEG, azimuth*RAD_DEG);
snprintf(tmp, sizeof(tmp), "[%.5f,%.5f]", altitude*RAD_DEG, azimuth*RAD_DEG);
return UnicodeString(tmp, "");
#else
return UnicodeString();
Expand Down
4 changes: 2 additions & 2 deletions icu4c/source/i18n/choicfmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ ChoiceFormat::dtos(double value,
char *itrPtr = temp;
char *expPtr;

sprintf(temp, "%.*g", DBL_DIG, value);
snprintf(temp, sizeof(temp), "%.*g", DBL_DIG, value);

/* Find and convert the decimal point.
Using setlocale on some machines will cause sprintf to use a comma for certain locales.
Using setlocale on some machines will cause snprintf to use a comma for certain locales.
*/
while (*itrPtr && (*itrPtr == '-' || isdigit(*itrPtr))) {
itrPtr++;
Expand Down
6 changes: 3 additions & 3 deletions icu4c/source/i18n/dtitvfmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ DateIntervalFormat::createInstance(const UnicodeString& skeleton,
UnicodeString pat;
((SimpleDateFormat*)dtfmt)->toPattern(pat);
pat.extract(0, pat.length(), result_1, "UTF-8");
sprintf(mesg, "skeleton: %s; pattern: %s\n", result, result_1);
snprintf(mesg, sizeof(mesg), "skeleton: %s; pattern: %s\n", result, result_1);
PRINTMESG(mesg)
#endif

Expand Down Expand Up @@ -761,7 +761,7 @@ DateIntervalFormat::initializePattern(UErrorCode& status) {
char result_1[1000];
char mesg[2000];
fSkeleton.extract(0, fSkeleton.length(), result, "UTF-8");
sprintf(mesg, "in getBestSkeleton: fSkeleton: %s; \n", result);
snprintf(mesg, sizeof(mesg), "in getBestSkeleton: fSkeleton: %s; \n", result);
PRINTMESG(mesg)
#endif
// fSkeleton is already set by createDateIntervalInstance()
Expand Down Expand Up @@ -808,7 +808,7 @@ DateIntervalFormat::initializePattern(UErrorCode& status) {
char result_1[1000];
char mesg[2000];
fSkeleton.extract(0, fSkeleton.length(), result, "UTF-8");
sprintf(mesg, "in getBestSkeleton: fSkeleton: %s; \n", result);
snprintf(mesg, sizeof(mesg), "in getBestSkeleton: fSkeleton: %s; \n", result);
PRINTMESG(mesg)
#endif

Expand Down
4 changes: 2 additions & 2 deletions icu4c/source/i18n/dtitvinf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ DateIntervalInfo::getBestSkeleton(const UnicodeString& skeleton,
char result_1[1000];
char mesg[2000];
skeleton.extract(0, skeleton.length(), result, "UTF-8");
sprintf(mesg, "in getBestSkeleton: skeleton: %s; \n", result);
snprintf(mesg, sizeof(mesg), "in getBestSkeleton: skeleton: %s; \n", result);
PRINTMESG(mesg)
#endif

Expand Down Expand Up @@ -616,7 +616,7 @@ DateIntervalInfo::getBestSkeleton(const UnicodeString& skeleton,
UnicodeString* newSkeleton = (UnicodeString*)keyTok.pointer;
#ifdef DTITVINF_DEBUG
skeleton->extract(0, skeleton->length(), result, "UTF-8");
sprintf(mesg, "available skeletons: skeleton: %s; \n", result);
snprintf(mesg, sizeof(mesg), "available skeletons: skeleton: %s; \n", result);
PRINTMESG(mesg)
#endif

Expand Down
4 changes: 2 additions & 2 deletions icu4c/source/i18n/plurrule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1808,9 +1808,9 @@ int32_t FixedDecimal::decimals(double n) {
}
}

// Slow path, convert with sprintf, parse converted output.
// Slow path, convert with snprintf, parse converted output.
char buf[30] = {0};
sprintf(buf, "%1.15e", n);
snprintf(buf, sizeof(buf), "%1.15e", n);
// formatted number looks like this: 1.234567890123457e-01
int exponent = atoi(buf+18);
int numFractionDigits = 15;
Expand Down
12 changes: 6 additions & 6 deletions icu4c/source/test/cintltst/capitst.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ static char* U_EXPORT2 ucol_sortKeyToString(const UCollator *coll, const uint8_t
uint8_t b;

if (position + 1 < len)
position += sprintf(buffer + position, "[");
position += snprintf(buffer + position, len-position, "[");
while ((b = *sortkey++) != 0) {
if (b == 1 && position + 5 < len) {
position += sprintf(buffer + position, "%02X . ", b);
position += snprintf(buffer + position, len-position, "%02X . ", b);
} else if (b != 1 && position + 3 < len) {
position += sprintf(buffer + position, "%02X ", b);
position += snprintf(buffer + position, len-position, "%02X ", b);
}
}
if (position + 3 < len)
position += sprintf(buffer + position, "%02X]", b);
position += snprintf(buffer + position, len-position, "%02X]", b);
return buffer;
}

Expand Down Expand Up @@ -1282,8 +1282,8 @@ void TestSortKey()

for(i=0;i<sortklen;i++)
{
sprintf(junk2+strlen(junk2), "%02X ",(int)( 0xFF & sortk2[i]));
sprintf(junk3+strlen(junk3), "%02X ",(int)( 0xFF & sortk3[i]));
snprintf(junk2+strlen(junk2), sizeof(junk2)-strlen(junk2), "%02X ",(int)( 0xFF & sortk2[i]));
snprintf(junk3+strlen(junk3), sizeof(junk3)-strlen(junk3), "%02X ",(int)( 0xFF & sortk3[i]));
}

log_verbose("%s\n", junk2);
Expand Down
4 changes: 2 additions & 2 deletions icu4c/source/test/cintltst/cbiditst.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "cbiditst.h"
#include "cstring.h"
#include <stdbool.h>
/* the following include is needed for sprintf */
/* the following include is needed for snprintf */
#include <stdio.h>

#define MAXLEN MAX_STRING_LENGTH
Expand Down Expand Up @@ -4489,7 +4489,7 @@ testStreaming(void) {
mismatch |= (UBool)(j >= nPortions ||
processedLen != testData[i].portionLens[levelIndex][j]);

sprintf(processedLenStr + j * 4, "%4d", processedLen);
snprintf(processedLenStr + j * 4, sizeof(processedLenStr) - j * 4, "%4d", processedLen);
srcLen -= processedLen, pSrc += processedLen;
}

Expand Down
8 changes: 4 additions & 4 deletions icu4c/source/test/cintltst/ccolltst.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ void addCollTest(TestNode** root)


/*Internal functions used*/
static char* dumpSk(uint8_t *sourceKey, char *sk) {
static char* dumpSk(uint8_t *sourceKey, char *sk, size_t n) {
uint32_t kLen = (uint32_t)strlen((const char *)sourceKey);
uint32_t i = 0;

*sk = 0;

for(i = 0; i<kLen; i++) {
sprintf(sk+2*i, "%02X", sourceKey[i]);
snprintf(sk+2*i, n-2*i, "%02X", sourceKey[i]);
}
return sk;
}
Expand Down Expand Up @@ -125,8 +125,8 @@ void reportCResult( const UChar source[], const UChar target[],
if(keyResult != expectedResult || keyResult != compareResult)
{
char sk[10000];
log_verbose("SortKey1: %s\n", dumpSk(sourceKey, sk));
log_verbose("SortKey2: %s\n", dumpSk(targetKey, sk));
log_verbose("SortKey1: %s\n", dumpSk(sourceKey, sk, sizeof(sk)));
log_verbose("SortKey2: %s\n", dumpSk(targetKey, sk, sizeof(sk)));
}
}

Expand Down
2 changes: 1 addition & 1 deletion icu4c/source/test/cintltst/cloctst.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ static void TestSimpleResourceInfo() {
log_err(" ISO-3 Country code mismatch: %s versus %s\n", austrdup(expected),
austrdup(dataTable[CTRY3][i]));
}
sprintf(temp2, "%x", (int)uloc_getLCID(testLocale));
snprintf(temp2, sizeof(temp2), "%x", (int)uloc_getLCID(testLocale));
if (strcmp(temp2, rawData2[LCID][i]) != 0) {
log_err("LCID mismatch: %s versus %s\n", temp2 , rawData2[LCID][i]);
}
Expand Down
2 changes: 1 addition & 1 deletion icu4c/source/test/cintltst/cnumtst.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

static const char *tagAssert(const char *f, int32_t l, const char *msg) {
static char _fileline[1000];
sprintf(_fileline, "%s:%d: ASSERT_TRUE(%s)", f, l, msg);
snprintf(_fileline, sizeof(_fileline), "%s:%d: ASSERT_TRUE(%s)", f, l, msg);
return _fileline;
}

Expand Down
14 changes: 7 additions & 7 deletions icu4c/source/test/cintltst/crestst.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "filestrm.h"
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h> // for sprintf()
#include <stdio.h> // for snprintf()

#define RESTEST_HEAP_CHECK 0

Expand Down Expand Up @@ -1093,13 +1093,13 @@ static void TestAlgorithmicParentFallback(void) {
UResourceBundle* regularRB = ures_open(NULL, testLocale, &err);
char errorMessage[200];

sprintf(errorMessage, "Error %s opening resource bundle for locale %s and URES_OPEN_LOCALE_DEFAULT_ROOT", u_errorName(err), testLocale);
snprintf(errorMessage, sizeof(errorMessage), "Error %s opening resource bundle for locale %s and URES_OPEN_LOCALE_DEFAULT_ROOT", u_errorName(err), testLocale);
if (assertSuccess(errorMessage, &err)) {
const char* resourceLocale = ures_getLocaleByType(regularRB, ULOC_ACTUAL_LOCALE, &err);

sprintf(errorMessage, "Error %s getting resource locale for locale %s and URES_OPEN_LOCALE_DEFAULT_ROOT", u_errorName(err), testLocale);
snprintf(errorMessage, sizeof(errorMessage), "Error %s getting resource locale for locale %s and URES_OPEN_LOCALE_DEFAULT_ROOT", u_errorName(err), testLocale);
if (assertSuccess(errorMessage, &err)) {
sprintf(errorMessage, "Mismatch for locale %s and URES_OPEN_LOCALE_DEFAULT_ROOT", testLocale);
snprintf(errorMessage, sizeof(errorMessage), "Mismatch for locale %s and URES_OPEN_LOCALE_DEFAULT_ROOT", testLocale);
if (uprv_strcmp(regularExpected, "root") == 0) {
assertEquals(errorMessage, defaultLocaleID, resourceLocale);
} else {
Expand All @@ -1112,13 +1112,13 @@ static void TestAlgorithmicParentFallback(void) {
err = U_ZERO_ERROR;
UResourceBundle* noDefaultRB = ures_openNoDefault(NULL, testLocale, &err);

sprintf(errorMessage, "Error %s opening resource bundle for locale %s and URES_OPEN_LOCALE_ROOT", u_errorName(err), testLocale);
snprintf(errorMessage, sizeof(errorMessage), "Error %s opening resource bundle for locale %s and URES_OPEN_LOCALE_ROOT", u_errorName(err), testLocale);
if (assertSuccess(errorMessage, &err)) {
const char* resourceLocale = ures_getLocaleByType(noDefaultRB, ULOC_ACTUAL_LOCALE, &err);

sprintf(errorMessage, "Error %s getting resource locale for locale %s and URES_OPEN_LOCALE_ROOT", u_errorName(err), testLocale);
snprintf(errorMessage, sizeof(errorMessage), "Error %s getting resource locale for locale %s and URES_OPEN_LOCALE_ROOT", u_errorName(err), testLocale);
if (assertSuccess(errorMessage, &err)) {
sprintf(errorMessage, "Mismatch for locale %s and URES_OPEN_LOCALE_ROOT", testLocale);
snprintf(errorMessage, sizeof(errorMessage), "Mismatch for locale %s and URES_OPEN_LOCALE_ROOT", testLocale);
assertEquals(errorMessage, noDefaultExpected, resourceLocale);
}
}
Expand Down
2 changes: 1 addition & 1 deletion icu4c/source/test/cintltst/creststn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2843,7 +2843,7 @@ static void TestCLDRStyleAliases(void) {
resource[0]='a';
resource[1]='0'+i;
resource[2]=0;
/* instead of sprintf(resource, "a%i", i); */
/* instead of snprintf(resource, "a%i", i); */
a = ures_getByKeyWithFallback(alias, resource, a, &status);
result = tres_getString(a, -1, NULL, &len, &status);
u_charsToUChars(expects[i], expected, (int32_t)strlen(expects[i])+1);
Expand Down
18 changes: 9 additions & 9 deletions icu4c/source/test/cintltst/nccbtst.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static void printUSeqErr(const UChar* a, int len)

static void setNuConvTestName(const char *codepage, const char *direction)
{
sprintf(gNuConvTestName, "[testing %s %s Unicode, InputBufSiz=%d, OutputBufSiz=%d]",
snprintf(gNuConvTestName, sizeof(gNuConvTestName), "[testing %s %s Unicode, InputBufSiz=%d, OutputBufSiz=%d]",
codepage,
direction,
(int)gInBufferSize,
Expand Down Expand Up @@ -2755,8 +2755,8 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t
offset_str[0] = 0;
for(p = junkout;p<targ;p++)
{
sprintf(junk + strlen(junk), "0x%02x, ", (0xFF) & (unsigned int)*p);
sprintf(offset_str + strlen(offset_str), "0x%02x, ", (0xFF) & (unsigned int)junokout[p-junkout]);
snprintf(junk + strlen(junk), sizeof(junk)-strlen(junk), "0x%02x, ", (0xFF) & (unsigned int)*p);
snprintf(offset_str + strlen(offset_str), sizeof(offset_str) - strlen(offset_str), "0x%02x, ", (0xFF) & (unsigned int)junokout[p-junkout]);
}

log_verbose(junk);
Expand Down Expand Up @@ -2951,8 +2951,8 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e

for(p = junkout;p<targ;p++)
{
sprintf(junk + strlen(junk), "0x%04x, ", (0xFFFF) & (unsigned int)*p);
sprintf(offset_str + strlen(offset_str), "0x%04x, ", (0xFFFF) & (unsigned int)junokout[p-junkout]);
snprintf(junk + strlen(junk), sizeof(junk)-strlen(junk), "0x%04x, ", (0xFFFF) & (unsigned int)*p);
snprintf(offset_str + strlen(offset_str), sizeof(offset_str)-strlen(offset_str), "0x%04x, ", (0xFFFF) & (unsigned int)junokout[p-junkout]);
}

log_verbose(junk);
Expand Down Expand Up @@ -3129,8 +3129,8 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen, con
offset_str[0] = 0;
for(p = junkout;p<targ;p++)
{
sprintf(junk + strlen(junk), "0x%02x, ", (0xFF) & (unsigned int)*p);
sprintf(offset_str + strlen(offset_str), "0x%02x, ", (0xFF) & (unsigned int)junokout[p-junkout]);
snprintf(junk + strlen(junk), sizeof(junk)-strlen(junk), "0x%02x, ", (0xFF) & (unsigned int)*p);
snprintf(offset_str + strlen(offset_str), sizeof(offset_str)-strlen(offset_str), "0x%02x, ", (0xFF) & (unsigned int)junokout[p-junkout]);
}

log_verbose(junk);
Expand Down Expand Up @@ -3308,8 +3308,8 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con

for(p = junkout;p<targ;p++)
{
sprintf(junk + strlen(junk), "0x%04x, ", (0xFFFF) & (unsigned int)*p);
sprintf(offset_str + strlen(offset_str), "0x%04x, ", (0xFFFF) & (unsigned int)junokout[p-junkout]);
snprintf(junk + strlen(junk), sizeof(junk)-strlen(junk), "0x%04x, ", (0xFFFF) & (unsigned int)*p);
snprintf(offset_str + strlen(offset_str), sizeof(offset_str)-strlen(offset_str), "0x%04x, ", (0xFFFF) & (unsigned int)junokout[p-junkout]);
}

log_verbose(junk);
Expand Down
10 changes: 5 additions & 5 deletions icu4c/source/test/cintltst/ncnvfbts.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void addTestConverterFallBack(TestNode** root)

static void setNuConvTestName(const char *codepage, const char *direction)
{
sprintf(gNuConvTestName, "[Testing %s %s Unicode, InputBufSiz=%d, OutputBufSiz=%d]",
snprintf(gNuConvTestName, sizeof(gNuConvTestName), "[Testing %s %s Unicode, InputBufSiz=%d, OutputBufSiz=%d]",
codepage,
direction,
(int)gInBufferSize,
Expand Down Expand Up @@ -236,8 +236,8 @@ static UBool testConvertFromUnicode(const UChar *source, int sourceLen, const u
offset_str[0] = 0;
for(p = junkout;p<targ;p++)
{
sprintf(junk + uprv_strlen(junk), "0x%02x, ", (0xFF) & (unsigned int)*p);
sprintf(offset_str + strlen(offset_str), "0x%02x, ", (0xFF) & (unsigned int)junokout[p-junkout]);
snprintf(junk + uprv_strlen(junk), sizeof(junk)-uprv_strlen(junk), "0x%02x, ", (0xFF) & (unsigned int)*p);
snprintf(offset_str + strlen(offset_str), sizeof(offset_str)-strlen(offset_str), "0x%02x, ", (0xFF) & (unsigned int)junokout[p-junkout]);
}

log_verbose(junk);
Expand Down Expand Up @@ -398,8 +398,8 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U

for(p = junkout;p<targ;p++)
{
sprintf(junk + strlen(junk), "0x%04x, ", (0xFFFF) & (unsigned int)*p);
sprintf(offset_str + strlen(offset_str), "0x%04x, ", (0xFFFF) & (unsigned int)junokout[p-junkout]);
snprintf(junk + strlen(junk), sizeof(junk)-strlen(junk), "0x%04x, ", (0xFFFF) & (unsigned int)*p);
snprintf(offset_str + strlen(offset_str), sizeof(offset_str)-strlen(offset_str), "0x%04x, ", (0xFFFF) & (unsigned int)junokout[p-junkout]);
}

log_verbose(junk);
Expand Down
Loading

0 comments on commit ec2d4b3

Please sign in to comment.