Branch: Tag:

2006-01-07

2006-01-07 17:05:41 by Martin Nilsson <mani@lysator.liu.se>

Don't search outside of the buffer.

Rev: lib/modules/Stdio.pmod/Terminfo.pmod:1.22

1: - // $Id: Terminfo.pmod,v 1.21 2006/01/07 16:39:02 nilsson Exp $ + // $Id: Terminfo.pmod,v 1.22 2006/01/07 17:05:41 nilsson Exp $   #pike __REAL_VERSION__      
379:    array(string) strarr = predef::map(array_sscanf(stroffs, "%2c"*nstr),    lambda(int offs, string buf) {    return offs<0xfffe && +  offs<sizeof(buf) &&    buf[offs..    search(buf, "\0", offs)-1];    }, strbuf+"\0");