Protect precious strlens, as pointed out by John Goerzen
[citadel.git] / citadel / modules / network / serv_netspool.c
index eeb35ba71b8fd060254ca953c498ffcdfae5812c..300efacb39de8f36deda13386d839dd0e7019099 100644 (file)
@@ -130,7 +130,9 @@ void network_bounce(struct CtdlMessage **pMsg, char *reason)
         * FIXME ... right now we're just sending a bounce; we really want to
         * include the text of the bounced message.
         */
-       CM_SetField(msg, eMesageText, reason, strlen(reason));
+       if (!IsEmptyStr(reason)) {
+               CM_SetField(msg, eMesageText, reason, strlen(reason));
+       }
        msg->cm_format_type = 0;
 
        /*