| 1 |
Description: Fix segfault in obex-check-device |
| 2 |
Bug-Debian: https://bugs.debian.org/825106 |
| 3 |
Forwarded: https://gitlab.com/openobex/mainline/-/merge_requests/2/diffs?commit_id=8e30bff036a47ca27c4f41d14f40f6a0fb9cba06 |
| 4 |
Last-Update: <2021-10-04> |
| 5 |
|
| 6 |
diff --git a/udev/obex-check-device.c b/udev/obex-check-device.c |
| 7 |
index 9eb4769..df160ca 100644 |
| 8 |
--- a/udev/obex-check-device.c |
| 9 |
+++ b/udev/obex-check-device.c |
| 10 |
@@ -62,8 +62,8 @@ int main (int argc, char **argv) |
| 11 |
unsigned long vendor; |
| 12 |
unsigned long product; |
| 13 |
|
| 14 |
- if (argc < 2) |
| 15 |
- return 0; |
| 16 |
+ if (argc < 3) |
| 17 |
+ return EXIT_FAILURE; |
| 18 |
|
| 19 |
vendor = strtoul(argv[1], NULL, 16); |
| 20 |
product = strtoul(argv[2], NULL, 16); |