From a6bf685ec3f64c3eae2d799aa1ebbdaa8f1de236 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 9 Mar 2009 14:55:20 +0000 Subject: Improve error detection from gpsd_hexpack(). --- hex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hex.c') diff --git a/hex.c b/hex.c index 2c7170a0..f09f6159 100644 --- a/hex.c +++ b/hex.c @@ -58,7 +58,7 @@ int gpsd_hexpack(char *src, char *dst, size_t len){ l = (int)(strlen(src) / 2); if ((l < 1) || ((size_t)l > len)) - return -1; + return -2; bzero(dst, (int)len); for (i = 0; i < l; i++) -- cgit v1.2.1