瀏覽代碼

rr: coherent check for optional user part of advertised rr

Daniel-Constantin Mierla 11 年之前
父節點
當前提交
48c42830f8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/rr/record.c

+ 1 - 1
modules/rr/record.c

@@ -651,7 +651,7 @@ static inline int build_advertised_rr(struct lump* _l, struct lump* _l2, str *_d
 	memcpy(p, rr_prefix, rr_prefix_len);
 	p += rr_prefix_len;
 
-	if (user->len) {
+	if (user && user->len) {
 		memcpy(p, user->s, user->len);
 		p += user->len;
 		*p = '@';