Re: PATCH 1/3: Fix buffer overflow and wrong behavior in url_encode
Philippe Altherr <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.devel |
|---|---|
| Message-ID | <CAGdYchu_q0Y+_+ijt=OSkkRJCFO4kU1Q7q2svzZyGv=tSUcPcQ@mail.gmail.com> |
"const unsigned char *in" looks very weird to me. Wouldn't it be possible to cast "*in" in the call to sprintf: out += sprintf(out, "%%%02X", (unsigned char)*in); or maybe out += sprintf(out, "%%%02X", *in & 0xFF); Philippe