bad buf_getbyte patch

Matt Johnston matt at ucc.asn.au
Wed Jan 19 10:13:19 WST 2005


On Wed, Jan 19, 2005 at 10:10:37AM +0800, Matt Johnston wrote:
> On Tue, Jan 18, 2005 at 12:06:34PM -0800, David Horwitt wrote:
> > I created a workaround/fix for my bad buf_getbyte problem:
> > 
> > *** svr-chansession.c   2005-01-11 13:14:54.000000000 -0800
> > --- svr-chansession.c.orig      2005-01-03 01:24:04.000000000 -0800
> > ***************
> > *** 439,445 ****
> > 
> >         if (len == 0) {
> >                 TRACE(("leave get_termmodes: empty terminal modes string"))
> > -               return;
> >         }
> > 
> >         while (((opcode = buf_getbyte(ses.payload)) != 0x00) && opcode <= 
> >         159) {
> > --- 439,444 ----
> > 
> > This seems to work OK w/out ill effects; the TRACE message implies that the 
> > return that I added may have
> > been intended all along.
> 
> Yes, I think that probably was my intent, sorry. That patch
> looks fine right to me.

Well, re-reading it actually should be an added 'return;',
not removed - I guess the diff was done in the wrong
direction? 

Matt


More information about the Dropbear mailing list