Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1753414171, "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":"af48d6be56626681fd98939e23d8940d", "commit": {"type":"commit", "time": 1523305979, "time_ofs": 120, "oid_tree": { "oid": "7f0fbb22df72042962bb5cd82f25f592414b88ac", "alias": []}, "oid":{ "oid": "55bd917bc4213bc668f48b87d8c6feb9918fef8f", "alias": []}, "msg": "bio/b_addr.c: resolve HP-UX compiler warnings.", "sig_commit": { "git_time": { "time": 1523305979, "offset": 120 }, "name": "Andy Polyakov", "email": "appro@openssl.org", "md5": "50bd64fa2a792cbbf679fa16213a3b2a" }, "sig_author": { "git_time": { "time": 1523018010, "offset": 120 }, "name": "Andy Polyakov", "email": "appro@openssl.org", "md5": "50bd64fa2a792cbbf679fa16213a3b2a" }}, "body": "bio/b_addr.c: resolve HP-UX compiler warnings.\n\nThe warning reads \u0022[cast] may cause misaligned access\u0022. Even though\nthis can be application-supplied pointer, misaligned access shouldn't\nhappen, because structure type is \u0022encoded\u0022 into data itself, and\napplication would customarily pass correctly aligned pointer. But\nthere is no harm in resolving the warning...\n\nReviewed-by: Rich Salz \u003crsalz@openssl.org\u003e\nReviewed-by: Richard Levitte \u003clevitte@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/5894)\n" , "diff": "diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c\nindex a2ef944..9832c0c 100644\n--- a/crypto/bio/b_addr.c\n+++ b/crypto/bio/b_addr.c\n@@ -66,18 +66,18 @@ void BIO_ADDR_clear(BIO_ADDR *ap)\n int BIO_ADDR_make(BIO_ADDR *ap, const struct sockaddr *sa)\n {\n if (sa-\u003esa_family \u003d\u003d AF_INET) {\n- ap-\u003es_in \u003d *(const struct sockaddr_in *)sa;\n+ memcpy(\u0026(ap-\u003es_in), sa, sizeof(struct sockaddr_in));\n return 1;\n }\n #ifdef AF_INET6\n if (sa-\u003esa_family \u003d\u003d AF_INET6) {\n- ap-\u003es_in6 \u003d *(const struct sockaddr_in6 *)sa;\n+ memcpy(\u0026(ap-\u003es_in6), sa, sizeof(struct sockaddr_in6));\n return 1;\n }\n #endif\n #ifdef AF_UNIX\n if (sa-\u003esa_family \u003d\u003d AF_UNIX) {\n- ap-\u003es_un \u003d *(const struct sockaddr_un *)sa;\n+ memcpy(\u0026(ap-\u003es_un), sa, sizeof(struct sockaddr_un));\n return 1;\n }\n #endif\n","s":{"c":1753414171,"u": 36808}} ],"g": 38249,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}