| 1 |
Description: |
| 2 |
Any pointer other than NULL is valid. The hack to reject pointers |
| 3 |
less than 0x8000 in an attempt to catch coding errors (an enum |
| 4 |
instead of a pointer to an enum) results in runtime errors. This |
| 5 |
leads to test suite failures and package FTBFS bugs. Use normal NULL |
| 6 |
test for pointer validity check. |
| 7 |
Author: Mattias Ellert <[email protected]> |
| 8 |
|
| 9 |
--- a/library/pids.c |
| 10 |
+++ b/library/pids.c |
| 11 |
@@ -1042,8 +1042,7 @@ |
| 12 |
* if (procps_pids_new(&info, PIDS_noop, 3) < 0) |
| 13 |
* ^~~~~~~~~~~~~~~~ |
| 14 |
*/ |
| 15 |
|
| 16 |
|
| 17 |
+ if (numitems < 1 || items == NULL) |
| 18 |
return 1; |
| 19 |
|
| 20 |
for (i = 0; i < numitems; i++) { |