Re: TLS Certificates

Adam Sjøgren <[email protected]>
Newsgroups gmane.discuss
Organization koldfront - analysis & revolution, Copenhagen, Denmark
Message-ID <[email protected]>
Adam writes:

>   nnrpd/post.c
>   642-        if (!IsValidHeaderField(OtherHeaders[i])) {
>   643-            snprintf(Error, sizeof(Error),
>   644:                     "Invalid syntax encountered in headers (unexpected "

Wait, couldn't this easily output the header?

--- nnrpd/post.c	2018-03-18 21:03:32.000000000 +0100
+++ nnrpd/post.c_new	2019-01-21 20:06:00.441110613 +0100
@@ -642,7 +642,7 @@
         if (!IsValidHeaderField(OtherHeaders[i])) {
             snprintf(Error, sizeof(Error),
                      "Invalid syntax encountered in headers (unexpected "
-                     "byte, no colon-space, or empty content line)");
+                     "byte, no colon-space, or empty content line): %s", OtherHeaders[i]);
             return Error;
         }
     }

I've probably sinned against the Gods of boundary checks and C-pointers
here; I can't remember the last time I wrote C.

BUT IT COMPILES, SHIP IT!


  Best regards,

    Adam

-- 
 "Static websites are fast, yet powerful and seen as          Adam Sjøgren
  the next big thing in publishing to internet."         [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.