Commit 9e0cdfab authored by Pekka Pessi's avatar Pekka Pessi

sip_parser.c: fixed overrrun in sip_method_name()

Ignore-this: efe0fc0935451b1b0ee403befac5df40

Coverity issue.

darcs-hash:20090513160906-db55f-165ac95bce2878d572aa56402e2485109ca3d266.gz
parent 7555011a
......@@ -335,7 +335,7 @@ char const * const sip_method_names[] = {
char const *sip_method_name(sip_method_t method, char const *name)
{
const size_t N = sizeof(sip_method_names)/sizeof(sip_method_names[0]);
if (method > 0 && (size_t)method <= N)
if (method > 0 && (size_t)method < N)
return sip_method_names[method];
else if (method == 0)
return name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment