{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1752655542,
"reponame":"openssl",
"desc":"OpenSSL",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/openssl",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"35fd0dd7524de3df7921ff07ea22a92b",
"commit": {"type":"commit",
"time": 1493403299,
"time_ofs": 18446744073709551376,
"oid_tree": { "oid": "288959e5c956b0306e34ca185b092a6b3f940950", "alias": []},
"oid":{ "oid": "595b2a42375427a254ad5a8c85870efea839a9b9", "alias": []},
"msg": "Check fflush on BIO_ctrl call",
"sig_commit": { "git_time": { "time": 1493403299, "offset": -240 }, "name": "Rich Salz", "email": "rsalz@openssl.org", "md5": "3ed6b9cf7bbe83902a044f6590346d26" },
"sig_author": { "git_time": { "time": 1493403299, "offset": -240 }, "name": "Rich Salz", "email": "rsalz@openssl.org", "md5": "3ed6b9cf7bbe83902a044f6590346d26" }},
"body": "Check fflush on BIO_ctrl call\n\nBug found and fix suggested by Julian RĂ¼th.\nPush error if fflush fails\n\nReviewed-by: Richard Levitte \u003clevitte@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/3266)\n"
,
"diff": "diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c\nindex adf935f..ae9867e 100644\n--- a/crypto/bio/bss_file.c\n+++ b/crypto/bio/bss_file.c\n@@ -190,6 +190,7 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr)\n FILE *fp \u003d (FILE *)b-\u003eptr;\n FILE **fpp;\n char p[4];\n+ int st;\n \n switch (cmd) {\n case BIO_C_FILE_SEEK:\n@@ -317,10 +318,14 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr)\n b-\u003eshutdown \u003d (int)num;\n break;\n case BIO_CTRL_FLUSH:\n- if (b-\u003eflags \u0026 BIO_FLAGS_UPLINK)\n- UP_fflush(b-\u003eptr);\n- else\n- fflush((FILE *)b-\u003eptr);\n+ st \u003d b-\u003eflags \u0026 BIO_FLAGS_UPLINK\n+ ? UP_fflush(b-\u003eptr) : fflush((FILE *)b-\u003eptr);\n+ if (st \u003d\u003d EOF) {\n+ SYSerr(SYS_F_FFLUSH, get_last_sys_error());\n+ ERR_add_error_data(1, \u0022fflush()\u0022);\n+ BIOerr(BIO_F_FILE_CTRL, ERR_R_SYS_LIB);\n+ ret \u003d 0;\n+ }\n break;\n case BIO_CTRL_DUP:\n ret \u003d 1;\ndiff --git a/crypto/err/err.c b/crypto/err/err.c\nindex d5cad05..f866f2f 100644\n--- a/crypto/err/err.c\n+++ b/crypto/err/err.c\n@@ -82,6 +82,7 @@ static ERR_STRING_DATA ERR_str_functs[] \u003d {\n {ERR_PACK(0, SYS_F_GETSOCKOPT, 0), \u0022getsockopt\u0022},\n {ERR_PACK(0, SYS_F_GETSOCKNAME, 0), \u0022getsockname\u0022},\n {ERR_PACK(0, SYS_F_GETHOSTBYNAME, 0), \u0022gethostbyname\u0022},\n+ {ERR_PACK(0, SYS_F_FFLUSH, 0), \u0022fflush\u0022},\n {0, NULL},\n };\n \ndiff --git a/include/openssl/err.h b/include/openssl/err.h\nindex 9bbe9e1..29a261c 100644\n--- a/include/openssl/err.h\n+++ b/include/openssl/err.h\n@@ -159,6 +159,7 @@ typedef struct err_state_st {\n # define SYS_F_GETSOCKOPT 15\n # define SYS_F_GETSOCKNAME 16\n # define SYS_F_GETHOSTBYNAME 17\n+# define SYS_F_FFLUSH 18\n \n /* reasons */\n # define ERR_R_SYS_LIB ERR_LIB_SYS/* 2 */\n","s":{"c":1752655542,"u": 28410}}
],"g": 29808,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}