projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba1f112
)
CCL: ccl_err_msg returns 0 ptr for invalid ccl_errno
author
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 24 Feb 2012 10:26:56 +0000
(11:26 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 24 Feb 2012 10:26:56 +0000
(11:26 +0100)
src/cclerrms.c
patch
|
blob
|
history
diff --git
a/src/cclerrms.c
b/src/cclerrms.c
index
e9b6a87
..
b0cafc1
100644
(file)
--- a/
src/cclerrms.c
+++ b/
src/cclerrms.c
@@
-35,7
+35,11
@@
static char *err_msg_array[] = {
const char *ccl_err_msg(int ccl_errno)
{
- return err_msg_array[ccl_errno];
+ if (ccl_errno >= 0 &&
+ ccl_errno < sizeof(err_msg_array)/sizeof(*err_msg_array))
+ return err_msg_array[ccl_errno];
+ else
+ return 0;
}
/*
* Local variables: