Module: sip-router Branch: master Commit: dd663a733845510a9ee0557b8d49f058c77ef02c URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=dd663a73...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Fri Dec 3 10:59:05 2010 +0100
uac: safety checks for empty values in uacreg
- the values in uacreg table must not be empty - reported by Bernhard Suttner
---
modules_k/uac/uac_reg.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules_k/uac/uac_reg.c b/modules_k/uac/uac_reg.c index d378bc7..8fb4e78 100644 --- a/modules_k/uac/uac_reg.c +++ b/modules_k/uac/uac_reg.c @@ -663,6 +663,11 @@ void uac_reg_timer(unsigned int ticks) reg.attr.s = \ (char*)(RES_ROWS(db_res)[i].values[pos].val.string_val); \ reg.attr.len = strlen(reg.attr.s); \ + if(reg.attr.len == 0) { \ + LM_ERR("empty value not allowed for column[%d]=%.*s\n", \ + pos, db_cols[pos]->len, db_cols[pos]->s); \ + goto error; \ + } \ } \ } while(0);