André Hentschel nerv@dawncrow.de writes:
@@ -124,6 +124,39 @@ void* CDECL _lsearch(const void* match, void* start, }
/*********************************************************************
bsearch_s (msvcrt.@)
- */
+void* CDECL MSVCRT_bsearch_s(const void *key, const void *base,
MSVCRT_size_t nmemb, MSVCRT_size_t size,
int (__cdecl *compare)(void *, const void *, const void *), void *ctx)
+{
- ssize_t min = 0;
- ssize_t max;
- if (!MSVCRT_CHECK_PMT(key != NULL) || !MSVCRT_CHECK_PMT(base != NULL) ||
!MSVCRT_CHECK_PMT(nmemb != 0) || !MSVCRT_CHECK_PMT(size != 0) ||
!MSVCRT_CHECK_PMT(compare != NULL) || !MSVCRT_CHECK_PMT(ctx != NULL))
- {
Some of these look suspicious, you need more tests.