help-libtasn1
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtasn1-4.9 ctype issue


From: Thomas Klausner
Subject: Re: libtasn1-4.9 ctype issue
Date: Tue, 17 Jan 2017 12:03:24 +0100

On Tue, Jan 17, 2017 at 11:57:21AM +0100, Nikos Mavrogiannopoulos wrote:
> On Tue, Jan 17, 2017 at 9:55 AM, Thomas Klausner <address@hidden> wrote:
> >> > NetBSD is pickier with ctype macros than most other operating
> >> > systems.
> >> Hi,
> >>  I do not see the issue. 'k' is defined as integer. If it is an issue
> >> with the netbsd compiler please provide a patch to address it.
> > The problem is not with k, but with the argument of "isdigit", which
> > is "string[k]". That's defined as char, not unsigned char.
> 
> Ah, ok now I see the point. Isn't it better to cast it to integer
> then, since isdigit() is defined to accept an integer? Even if the
> libc uses a macro which ends up using the value in an array, that
> would work properly.

I just tried, and

        if (!isdigit ((int)string[k]))

works as well without warnings.

In NetBSD's code we use (unsigned char) though.
 Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]