On Sunday, October 07, 2001, Mike Barcroft wrote:
> for (i = 0; ip_whois[i] != NULL; i++) {
> - if (strstr(buf, ip_whois[i]) == NULL)
> + if (strnstr(buf, ip_whois[i], len) ==
> +
Todd C. Miller <[EMAIL PROTECTED]> writes:
> In message <[EMAIL PROTECTED]>
> so spake Mike Barcroft (mike):
>
> > Would you please test the attached patch and confirm that it solves
> > the problem? If it does, I'll commit it today.
>
> I doubt that is sufficient as "buf" is treated as a
On Sun, Oct 07, 2001 at 13:37:16 -0400, Mike Barcroft wrote:
> >
> > Must be isspace((unsigned char))
>
> Why and where can I find documentation about this?
isspace(3)
--
Andrey A. Chernov
http://ache.pp.ru/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in
Mike Barcroft <[EMAIL PROTECTED]> writes:
> Andrey A. Chernov <[EMAIL PROTECTED]> writes:
> > On Thu, Oct 04, 2001 at 12:16:40 +0300, Peter Pentchev wrote:
> > > + if ((len == 0) || !isspace(buf[len - 1])) {
> > Must be isspace((unsigned char))
> Why and where can I find documentation
Andrey A. Chernov <[EMAIL PROTECTED]> writes:
> On Thu, Oct 04, 2001 at 12:16:40 +0300, Peter Pentchev wrote:
> > + if ((len == 0) || !isspace(buf[len - 1])) {
>
> Must be isspace((unsigned char))
Why and where can I find documentation about this?
Best regards,
Mike Barcroft
To U
On Thu, Oct 04, 2001 at 01:02:56PM -0400, Garrett Wollman wrote:
> < said:
>
> > - printf("%s\n", buf);
> > + printf("%.*s\n", (int)len, buf);
>
> This is a *much* better patch.
..yet it needs more work: strstr() and strcspn() are used on
a non-null-terminated string. And e
On Thu, Oct 04, 2001 at 01:47:10PM -0400, Mike Barcroft wrote:
> Todd C. Miller <[EMAIL PROTECTED]> writes:
> > In message <[EMAIL PROTECTED]>
> > so spake Mike Barcroft (mike):
> >
> > > Would you please test the attached patch and confirm that it solves
> > > the problem? If it does, I'll
Todd C. Miller <[EMAIL PROTECTED]> writes:
> In message <[EMAIL PROTECTED]>
> so spake Mike Barcroft (mike):
>
> > Would you please test the attached patch and confirm that it solves
> > the problem? If it does, I'll commit it today.
>
> I doubt that is sufficient as "buf" is treated as a
< said:
> - printf("%s\n", buf);
> + printf("%.*s\n", (int)len, buf);
This is a *much* better patch.
-GAWollman
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message
In message <[EMAIL PROTECTED]>
so spake Mike Barcroft (mike):
> Would you please test the attached patch and confirm that it solves
> the problem? If it does, I'll commit it today.
I doubt that is sufficient as "buf" is treated as a NUL terminated
string in the calls to strstr(). Also
Peter Pentchev <[EMAIL PROTECTED]> writes:
> As described in PR bin/30968, whois(1) may access invalid data when
> the whois server returns a non-newline-terminated string.
> While it is true that the whois server maintainers should do a better
> job of following standards and such, still the 'be
On Thu, Oct 04, 2001 at 01:28:02PM +0400, Andrey A. Chernov wrote:
> On Thu, Oct 04, 2001 at 12:16:40 +0300, Peter Pentchev wrote:
> > + if ((len == 0) || !isspace(buf[len - 1])) {
>
> Must be isspace((unsigned char))
On Thu, Oct 04, 2001 at 01:30:42PM +0400, Andre
On Thu, Oct 04, 2001 at 12:16:40 +0300, Peter Pentchev wrote:
> + abuf = calloc(1, len + 1);
> + if (abuf == NULL) {
> + errno = ENOMEM;
> + err(1, "reallocating");
> + }
To overwri
On Thu, Oct 04, 2001 at 12:16:40 +0300, Peter Pentchev wrote:
> + if ((len == 0) || !isspace(buf[len - 1])) {
Must be isspace((unsigned char))
--
Andrey A. Chernov
http://ache.pp.ru/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of t
Hi,
As described in PR bin/30968, whois(1) may access invalid data when
the whois server returns a non-newline-terminated string.
While it is true that the whois server maintainers should do a better
job of following standards and such, still the 'be liberal in what
you accept' mindset might be a
15 matches
Mail list logo