← Commit list

28d91d754

Denys Vlasenko
Denys Vlasenko
2018-09-03
SUCCESS Duration: 147s

Subject

libbb: fix potential NULL pointer use

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/unicode.c+2 -0
@@ -1121,6 +1121,8 @@ static char* FAST_FUNC unicode_conv_to_printable2(uni_stat_t *stats, const char
dst[dst_len++] = ' ';
}
}
+ if (!dst) /* for example, if input was "" */
+ dst = xzalloc(1);
dst[dst_len] = '\0';
if (stats) {
stats->byte_count = dst_len;