a735c0
diff --git a/src/cstdio.c b/src/cstdio.c
a735c0
index 7b6fe6d..0a0bd5b 100644
a735c0
--- a/src/cstdio.c
a735c0
+++ b/src/cstdio.c
a735c0
@@ -144,7 +144,7 @@ int getbl(p,end)char*p,*end;					  /* my gets */
a735c0
       { case '\n':case EOF:*q='\0';
a735c0
 	   return overflow?-1:p!=q;	     /* did we read anything at all? */
a735c0
       }
a735c0
-     if(q==end)	    /* check here so that a trailing backslash won't be lost */
a735c0
+     if(q>=end)	    /* check here so that a trailing backslash won't be lost */
a735c0
 	q=p,overflow=1;
a735c0
      *q++=i;
a735c0
    }
a735c0
@@ -199,7 +199,7 @@ int getlline(target,end)char*target,*end;
a735c0
 	   if(*(target=strchr(target,'\0')-1)=='\\')
a735c0
 	    { if(chp2!=target)				  /* non-empty line? */
a735c0
 		 target++;		      /* then preserve the backslash */
a735c0
-	      if(target>end-2)			  /* space enough for getbl? */
a735c0
+	      if(target>=end-2)			  /* space enough for getbl? */
a735c0
 		 target=end-linebuf,overflow=1;		/* toss what we have */
a735c0
 	      continue;
a735c0
 	    }
a735c0
diff --git a/src/formail.c b/src/formail.c
a735c0
index 1f5c9dd..49b9967 100644
a735c0
--- a/src/formail.c
a735c0
+++ b/src/formail.c
a735c0
@@ -219,7 +219,8 @@ static char*getsender(namep,fldp,headreply)char*namep;struct field*fldp;
a735c0
   if(i>=0&&(i!=maxindex(sest)||fldp==rdheader))		  /* found anything? */
a735c0
    { char*saddr;char*tmp;			     /* determine the weight */
a735c0
      nowm=areply&&headreply?headreply==1?sest[i].wrepl:sest[i].wrrepl:i;chp+=j;
a735c0
-     tmp=malloc(j=fldp->Tot_len-j);tmemmove(tmp,chp,j);(chp=tmp)[j-1]='\0';
a735c0
+     tmp=malloc((j=fldp->Tot_len-j) + 1);tmemmove(tmp,chp,j);(chp=tmp)[j-1]='\0';
a735c0
+     chp[j]='\0';
a735c0
      if(sest[i].head==From_)
a735c0
       { char*pastad;
a735c0
 	if(strchr(saddr=chp,'\n'))		     /* multiple From_ lines */
a735c0
@@ -364,7 +365,7 @@ static PROGID;
a735c0
 
a735c0
 int main(lastm,argv)int lastm;const char*const argv[];
a735c0
 { int i,split=0,force=0,bogus=1,every=0,headreply=0,digest=0,nowait=0,keepb=0,
a735c0
-   minfields=(char*)progid-(char*)progid,conctenate=0,babyl=0,babylstart,
a735c0
+   minfields=(char*)progid-(char*)progid,conctenate=0,babyl=0,babylstart=0,
a735c0
    berkeley=0,forgetclen;
a735c0
   long maxlen,ctlength;FILE*idcache=0;pid_t thepid;
a735c0
   size_t j,lnl,escaplen;char*chp,*namep,*escap=ESCAP;
a735c0
diff --git a/src/formisc.c b/src/formisc.c
a735c0
index c48df52..5c2869d 100644
a735c0
--- a/src/formisc.c
a735c0
+++ b/src/formisc.c
a735c0
@@ -66,7 +66,7 @@ inc:	   start++;
a735c0
 retz:	      *target='\0';
a735c0
 ret:	      return start;
a735c0
 	    }
a735c0
-	   if(*start=='\\')
a735c0
+	   if(*start=='\\' && *(start + 1))
a735c0
 	      *target++='\\',start++;
a735c0
 	   hitspc=2;
a735c0
 	   goto normal;					      /* normal word */