OSDN Git Service

* cygcheck.cc (cygwin_info): Add some more bounds checking. From Matt Harget
authorcgf <cgf>
Sat, 16 Dec 2000 04:53:30 +0000 (04:53 +0000)
committercgf <cgf>
Sat, 16 Dec 2000 04:53:30 +0000 (04:53 +0000)
commit5dace6bc1750cf7bd2c4c523176161d4192bc0f1
tree8f304b4860b104c766d39ddab1747222950de949
parentde987760deda8a827c3cfee5339054d5e035a7f9
* cygcheck.cc (cygwin_info): Add some more bounds checking.  From Matt Harget
<matt@use.net>:
* utils/cygcheck.cc (keyeprint): Move declaration before other functions so it
could be used by all functions to report error messages.  Add comment.
(add_path): Check for NULL return from malloc.
(find_on_path): Check initial uses of pointers for NULL.
(rva_to_offset): Ditto.
(init_paths): Add checking for return values of Win32 calls.
(get_dword): Ditto.
(get_word): Ditto.
(dll_info): Ditto, also add NULL pointer checks.
(scan_registry): Ditto.
(check_keys): Ditto.
(dump_sysinfo): Ditto.  Add default case to switch.  Add error reporting if
GetVolumeInformation fails, except when it returns ERROR_NOT_READY.
(track_down): Add checking for NULL pointers and return values of Win32 calls.
(cygwin_info): Ditto.  Correct small memory leak.
winsup/utils/ChangeLog
winsup/utils/cygcheck.cc