瀏覽代碼

pua_dialoginfo: proper jump to end of the structure

- void has no standard size
- descovered on a report by Charles Chance
Daniel-Constantin Mierla 11 年之前
父節點
當前提交
4108c7a125
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/pua_dialoginfo/pua_dialoginfo.c

+ 1 - 1
modules/pua_dialoginfo/pua_dialoginfo.c

@@ -347,7 +347,7 @@ struct str_list* get_str_list(unsigned short avp_flags, int_str avp_name) {
 
 		memset( list_current, 0, len);
 
-		list_current->s.s = (char*)( (void*) list_current + sizeof(struct str_list));
+		list_current->s.s = (char*)list_current + sizeof(struct str_list);
 		list_current->s.len = avp_value.s.len;
 		memcpy(list_current->s.s,avp_value.s.s,avp_value.s.len);