]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
lsearch.3: Dereference 'nmemb' pointer
authorAlejandro Colomar <alx@kernel.org>
Thu, 14 Nov 2024 22:46:26 +0000 (23:46 +0100)
committerAlejandro Colomar <alx@kernel.org>
Thu, 14 Nov 2024 22:47:58 +0000 (23:47 +0100)
nmemb is a pointer, so it needs to be dereferenced to calculate the size
of the array.

Reported-by: Martin Uecker <uecker@tugraz.at>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man3/lsearch.3

index 1d1bf0b5b87af2de10f4aa205c68cc8050d6189f..c15c072cf34724356707a8542aaaca3683728233 100644 (file)
@@ -15,12 +15,12 @@ Standard C library
 .B #include <search.h>
 .P
 .BI "void *lfind(const void " key [. size "], \
-const void " base [. size " * ." nmemb ],
+const void " base [*. nmemb " * ." size ],
 .BI "            size_t *" nmemb ", size_t " size ,
 .BI "            int(*" compar ")(const void [." size "], \
 const void [." size ]));
 .BI "void *lsearch(const void " key [. size "], \
-void " base [. size " * ." nmemb ],
+void " base [*. nmemb " * ." size ],
 .BI "            size_t *" nmemb ", size_t " size ,
 .BI "            int(*" compar ")(const void [." size "], \
 const void [." size ]));