]> diplodocus.org Git - nmh/blobdiff - sbr/encode_rfc2047.c
Moved LDFLAGS to AM_LDFLAGS.
[nmh] / sbr / encode_rfc2047.c
index 581214b7cf65eb29e1e571d779cd02b221411bf4..2c8a3f0d9ffcf1ed2baa4528a10a7b8ca570a61d 100644 (file)
@@ -281,16 +281,22 @@ field_encode_quoted(const char *name, char **value, const char *charset,
             * allow for the encoded output.
             */
            if (column + (utf8len(p) * 3) > ENCODELINELIMIT - 2) {
-               newline = 1;
+               newline = 1;
            }
        }
     }
 
+    if (q == NULL) {
+       /* This should never happen, but just in case.  Found by
+          clang static analyzer. */
+       admonish (NULL, "null output encoding for %s", *value);
+       return 1;
+    }
     *q++ = '?';
     *q++ = '=';
 
     if (prefixlen)
-       *q++ = '\n';
+       *q++ = '\n';
 
     *q = '\0';