소스 검색

- fix: return status not checked when converting a string into a number in
comp_str(...) (used when comparing string to numbers in ser.cfg). Patch from
Bogdan Pintea <[email protected]>.
Closes SER-338.

Andrei Pelinescu-Onciul 17 년 전
부모
커밋
fddc0b6631
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      route.c

+ 2 - 1
route.c

@@ -630,7 +630,8 @@ inline static int comp_str(int op, str* left, int rtype, union exp_op* r, struct
 			 * $test > 10
 			 * the right operator MUST be number to do the conversion
 			 */
-		str2int(left,&l);
+		if (str2int(left,&l) < 0)
+			goto error;
 		return comp_num(op, l, rtype, r);
 	} else {
 		LOG(L_CRIT, "BUG: comp_str: Bad type %d, "