aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Macek via Cygwin-patches <cygwin-patches@cygwin.com>2020-04-16 23:09:07 +0200
committerCorinna Vinschen <corinna@vinschen.de>2020-04-17 09:54:40 +0200
commit5951b3e600f32fd1d96b73f4ccf05d081a5d9428 (patch)
tree8c95d8cfeb89a07f72a9219ed59c7a8c50839f73
parent1fac24078a8c619d015a5e8d951c7d127f7c75f7 (diff)
downloadnewlib-5951b3e600f32fd1d96b73f4ccf05d081a5d9428.zip
newlib-5951b3e600f32fd1d96b73f4ccf05d081a5d9428.tar.gz
newlib-5951b3e600f32fd1d96b73f4ccf05d081a5d9428.tar.bz2
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>
-rw-r--r--winsup/cygwin/uinfo.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 2d5de35..57d9018 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;