[Patch] Some suggested patches

Marc Lehmann schmorp at schmorp.de
Sat Aug 19 00:05:23 CEST 2006


On Fri, Aug 18, 2006 at 04:31:20PM +0200, Roland Baer <roland at verifysoft.de> wrote:
> Hello,
> 
> please find attached my cumulative patches
> - rxvt-unicode.patch 

I would prefer if they were kept single patches, as its customary that some
patches are fine while others aren't. I can mix and match in this case, so no
action is required.

> - rxvt_term::IM_get_IC(): found can be used uninitialised. 

found is initialised before it is used, so the patch unnecessarily
increases code size.

>            At least one data path leads to that

If that is true, which one?

> - rxvtd.C: Adjusted the sockname length check to the one in rxvtc.C. 
>            Otherwise this would throw an (uncaught) exception.

Which is not that bad, considering that rxvtd cannot continue anyways(?).

> - rxvtd.C: delete[] colors instead of delete colors. More correct.

Actually, only correct, the current code invokes undefined behaviour...
(also for pixcolors).

> - xpm.C rxvt_term::scale_pixmap(): Made str[] 1 bigger, otherwise we
>            would have an buffer overflow later " str[n] = '\0';"
>            Proof that we can hit that:
>             echo -e "\E]20;;100000x100000+100000+10000;?\a"

Wouldn't the correct fix be to fix the check for <= MAX_GEOM instead and
that way catch the bogus size?

(also, printf is a better way to specify examples, as that works on
posix-comaptible shells).

Thanks for your patches.

-- 
                The choice of a
      -----==-     _GNU_
      ----==-- _       generation     Marc Lehmann
      ---==---(_)__  __ ____  __      pcg at goof.com
      --==---/ / _ \/ // /\ \/ /      http://schmorp.de/
      -=====/_/_//_/\_,_/ /_/\_\      XX11-RIPE




More information about the rxvt-unicode mailing list