Warmcat homepage andy@warmcat.com
libwebsockets
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1756842611, "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":"3285f2b03babcf4483ccf85475d38015", "commit": {"type":"commit", "time": 1456504016, "time_ofs": 18446744073709551316, "oid_tree": { "oid": "acaa22f09a0a64e32b6391626dcb8c813dbe15f1", "alias": []}, "oid":{ "oid": "d3c02d844abeaf961bad692cf6f3876ccabf2435", "alias": []}, "msg": "GH680: Reuse strnlen() in strndup()", "sig_commit": { "git_time": { "time": 1456504016, "offset": -300 }, "name": "Rich Salz", "email": "rsalz@openssl.org", "md5": "3ed6b9cf7bbe83902a044f6590346d26" }, "sig_author": { "git_time": { "time": 1455520360, "offset": 180 }, "name": "Dmitry-Me", "email": "wipedout@yandex.ru", "md5": "e2cef525cef5d7b0078f33b707e30c69" }}, "body": "GH680: Reuse strnlen() in strndup()\n\nSigned-off-by: Rich Salz \u003crsalz@openssl.org\u003e\nReviewed-by: Matt Caswell \u003cmatt@openssl.org\u003e\n" , "diff": "diff --git a/crypto/o_str.c b/crypto/o_str.c\nindex b200060..b01128c 100644\n--- a/crypto/o_str.c\n+++ b/crypto/o_str.c\n@@ -133,17 +133,13 @@ char *CRYPTO_strdup(const char *str, const char* file, int line)\n \n char *CRYPTO_strndup(const char *str, size_t s, const char* file, int line)\n {\n- const char *cp;\n size_t maxlen;\n char *ret;\n \n if (str \u003d\u003d NULL)\n return NULL;\n \n- /* Get length. */\n- for (cp \u003d str, maxlen \u003d s; maxlen-- !\u003d 0 \u0026\u0026 *cp !\u003d '\u005c0'; ++cp)\n- continue;\n- maxlen \u003d cp - str;\n+ maxlen \u003d OPENSSL_strnlen(str, s)\n \n ret \u003d CRYPTO_malloc(maxlen + 1, file, line);\n if (ret) {\n","s":{"c":1756842611,"u": 2303}} ],"g": 3583,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}