소스 검색

Fix truncation check in (deprecated) mg_upload_field_found

The logic here is inverted. If 'truncated' has been set to 'true' by
mg_snprintf(), then it means the file path was too long.
newsoft 7 년 전
부모
커밋
8883ae1c24
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -12072,7 +12072,7 @@ mg_upload_field_found(const char *key,
 	            "%s/%s",
 	            fud->destination_dir,
 	            filename);
-	if (!truncated) {
+	if (truncated) {
 		mg_cry(fud->conn, "%s: File path too long", __func__);
 		return FORM_FIELD_STORAGE_ABORT;
 	}