NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/50822: src/lib/libm/arch/i387/fenv.c: 2 * bad size in memcpy ?
>Number: 50822
>Category: lib
>Synopsis: src/lib/libm/arch/i387/fenv.c: 2 * bad size in memcpy ?
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 17 11:55:00 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160216
>Organization:
>Environment:
>Description:
1.
src/lib/libm/arch/i387/fenv.c:405]: (warning) Division by result of sizeof(). memcpy() expects a size in bytes, did you intend to multiply instead?
Source code is
memcpy(__fe_dfl_env.x87.others,
env.x87.others,
sizeof(__fe_dfl_env.x87.others) / sizeof(uint32_t));
Maybe better code might be
memcpy(__fe_dfl_env.x87.others,
env.x87.others,
sizeof(__fe_dfl_env.x87.others));
2.
src/lib/libm/arch/i387/fenv.c:441]: (warning) Division by result of sizeof(). memcpy() expects a size in bytes, did you intend to multiply instead?
memcpy(__fe_dfl_env.x87.others,
env.x87.others,
sizeof(__fe_dfl_env.x87.others) / sizeof(uint32_t));
Duplicate.
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index