]> git.pond.sub.org Git - empserver/commitdiff
Don't write junk bits to unused bytes of telegram files
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 14 Mar 2008 20:22:32 +0000 (21:22 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 14 Mar 2008 20:22:32 +0000 (21:22 +0100)
There are holes in struct telstr, which typed_wu() neglected to
initialize.  Fix that.

src/lib/subs/wu.c

index 31a0c8e14cabb4e19cf3384e8345e0ff49b8b202..65c200969cd795a2fd7cf2eb1020e5d6e114f412 100644 (file)
@@ -141,6 +141,7 @@ typed_wu(natid from, natid to, char *message, int type)
        logerror("telegram 'open' of %s (#%d) failed", box, to);
        return -1;
     }
+    memset(&tel, 0, sizeof(tel));
     tel.tel_from = from;
     (void)time(&tel.tel_date);
     len = strlen(message);