git: bce34cba07bc - main - bintrans: Fix uninitialized variable.

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Thu, 01 Feb 2024 13:11:10 UTC
The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=bce34cba07bcfed9cd519a658e594c9910c8f210

commit bce34cba07bcfed9cd519a658e594c9910c8f210
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2024-02-01 13:10:37 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2024-02-01 13:10:37 +0000

    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
---
 usr.bin/bintrans/qp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) {