summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-08-27 03:12:30 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-08-27 03:12:30 -0400
commit98e913ae827cb6b04d0fbcc9bcbf4d707a1f4e3b (patch)
tree41e7fa50d80a539ebbfb22c388da78672c38b810 /gpsd.c
parent9c7341388346083bbb1bb1047246e9fc345c1c42 (diff)
downloadgpsd-98e913ae827cb6b04d0fbcc9bcbf4d707a1f4e3b.tar.gz
Temporarily revert code for freeing devices on bad fd in select.
This began producing buffer overflows out of the blue in the regression tests. More weirdly, it was retroactive - revisions after my commit of 2014-08-24T11:27:11 that introduced this change started failing in the same way, even though they had passed regressions before. This may reveal an underlying bug in free_device() that is phase-of-moon dependent - to be investigated.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gpsd.c b/gpsd.c
index 787bdc82..31d0651b 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -2173,11 +2173,13 @@ int main(int argc, char *argv[])
case AWAIT_GOT_INPUT:
break;
case AWAIT_NOT_READY:
+#ifdef __UNUSED_
for (device = devices; device < devices + MAXDEVICES; device++)
if (FD_ISSET(device->gpsdata.gps_fd, &efds)) {
deactivate_device(device);
free_device(device);
}
+#endif /* UNUSED__ */
continue;
case AWAIT_FAILED:
exit(EXIT_FAILURE);