aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2024-02-01 13:10:37 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2024-02-01 13:10:37 +0000
commitbce34cba07bcfed9cd519a658e594c9910c8f210 (patch)
tree83f213199245966bbe0175165c273bab9661a3ed
parent5cb28f7979773715615cc2131fe40e0c5879ed1d (diff)
downloadsrc-bce34cba07bcfed9cd519a658e594c9910c8f210.tar.gz
src-bce34cba07bcfed9cd519a658e594c9910c8f210.zip
bintrans: Fix uninitialized variable.
`prev` may be used uninitialized if `body` starts with a newline. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D43534
-rw-r--r--usr.bin/bintrans/qp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/bintrans/qp.c b/usr.bin/bintrans/qp.c
index 74fa1ec3ae90..33aabb35a101 100644
--- a/usr.bin/bintrans/qp.c
+++ b/usr.bin/bintrans/qp.c
@@ -90,9 +90,9 @@ decode_quoted_printable(const char *body, FILE *fpo)
static void
encode_quoted_printable(const char *body, FILE *fpo)
{
- char prev;
const char *end = body + strlen(body);
size_t linelen = 0;
+ char prev = '\0';
while (*body != '\0') {
if (linelen == 75) {