chore: 规范标点
This commit is contained in:
1 parent
e54390a9f8
commit
15e79887fa
84 files changed
+5439
-5398
No files matched your search
+4
-4
@@ -1,6 +1,6 @@
|
||||
/* reduce.c - 把 fuzz 找到的失败输入最小化到最短复现样例
|
||||
*
|
||||
* 判定(oracle):同一段输入,"一次性喂" 与 "逐字节喂" 的渲染结果不一致。
|
||||
* 判定 (oracle):同一段输入, "一次性喂" 与 "逐字节喂" 的渲染结果不一致.
|
||||
* 用法: build/reduce build/md_fail.bin
|
||||
*/
|
||||
#include "markdown.h"
|
||||
@@ -9,8 +9,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* 注意:md_feed 只接受 NUL 结尾的字符串,而最小化过程中的缓冲区
|
||||
* 是"长度受限"的,所以必须先做一份带结尾符的副本。 */
|
||||
/* 注意:md_feed 只接受 NUL 结尾的字符串, 而最小化过程中的缓冲区
|
||||
* 是"长度受限"的, 所以必须先做一份带结尾符的副本. */
|
||||
static char *render(const char *src, size_t len, size_t chunk)
|
||||
{
|
||||
char *text = xmalloc(len + 1);
|
||||
@@ -44,7 +44,7 @@ static char *render(const char *src, size_t len, size_t chunk)
|
||||
static int fails(const char *src, size_t len)
|
||||
{
|
||||
if (len == 0) return 0;
|
||||
/* md_feed 以 NUL 结尾,输入里不能有 NUL */
|
||||
/* md_feed 以 NUL 结尾, 输入里不能有 NUL */
|
||||
for (size_t i = 0; i < len; i++) if (src[i] == '\0') return 0;
|
||||
char *a = render(src, len, 0);
|
||||
char *b = render(src, len, 1);
|
||||
|
||||
Reference in new issue
Block a user