public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Possibly buggy use of ctype.h macros.
@ 2024-01-02 22:18 Kaz Kylheku
  2024-01-02 23:25 ` Takashi Yano
  0 siblings, 1 reply; 6+ messages in thread
From: Kaz Kylheku @ 2024-01-02 22:18 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

Hi All, 

I noticed that this macro, defined in winsup/cygwin/local_includes/path.h: 

  #define isdrive(s) (isalpha (*(s)) && (s)[1] == ':') 

is being used with arguments of type char, like dereferenced "char *" pointers. 

Unless the isalpha implementation is robust against this, it should be isalpha((unsigned char) *(s)).

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-03  6:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-02 22:18 Possibly buggy use of ctype.h macros Kaz Kylheku
2024-01-02 23:25 ` Takashi Yano
2024-01-02 23:56   ` Kaz Kylheku
2024-01-03  0:11     ` Takashi Yano
2024-01-03  3:59       ` Kaz Kylheku
2024-01-03  6:58         ` Takashi Yano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).