public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] cygheap_pwdgrp: Handle invalid db_* entries correctly
@ 2020-04-17 8:08 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2020-04-17 8:08 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5951b3e600f32fd1d96b73f4ccf05d081a5d9428
commit 5951b3e600f32fd1d96b73f4ccf05d081a5d9428
Author: David Macek via Cygwin-patches <cygwin-patches@cygwin.com>
Date: Thu Apr 16 23:09:07 2020 +0200
cygheap_pwdgrp: Handle invalid db_* entries correctly
If the first scheme in db_* was invalid, the code would think there
were no schemes specified and replace the second scheme with
NSS_SCHEME_DESC.
Signed-off-by: David Macek <david.macek.0@gmail.com>
Diff:
---
winsup/cygwin/uinfo.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 2d5de359b..57d90189d 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -823,7 +823,10 @@ cygheap_pwdgrp::nss_init_line (const char *line)
c, e - c);
}
else
- debug_printf ("Invalid nsswitch.conf content: %s", line);
+ {
+ debug_printf ("Invalid nsswitch.conf content: %s", line);
+ --idx;
+ }
c += strcspn (c, " \t");
c += strspn (c, " \t");
++idx;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-17 8:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 8:08 [newlib-cygwin] cygheap_pwdgrp: Handle invalid db_* entries correctly Corinna Vinschen
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).