diff mbox series

[4/8] gard: Fix max instance count

Message ID 20171130053129.22642-4-oohall@gmail.com
State Accepted
Headers show
Series [1/8] gard: Allow records with an ID of 0xffffffff | expand

Commit Message

Oliver O'Halloran Nov. 30, 2017, 5:31 a.m. UTC
There's an entire byte for the instance count rather than a nibble. Only
barf if the instance number is beyond 255 rather than 16.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 external/gard/gard.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/external/gard/gard.c b/external/gard/gard.c
index 5a57415ab5a7..d7a0876bbf31 100644
--- a/external/gard/gard.c
+++ b/external/gard/gard.c
@@ -340,9 +340,9 @@  int parse_path(const char *str, struct entity_path *parsed)
 			return -1;
 		}
 
-		if (instance > 15 || instance < 0) {
+		if (instance > 255 || instance < 0) {
 			fprintf(stderr,
-				"Instance %ld is invalid. Must be 0 to 15\n",
+				"Instance %ld is invalid. Must be 0 to 255\n",
 				instance);
 			return -1;
 		}