Issue Details (XML | Word | Printable)

Key: STDCXX-730
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Martin Sebor
Reporter: Martin Sebor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library
STDCXX-726

[HP aCC 6.15] potential null dererefence and out of bound access in iso2022.cpp

Created: 13/Feb/08 11:55 PM   Updated: 17/Apr/08 10:04 AM
Return to search
Component/s: 22. Localization
Affects Version/s: 4.2.0
Fix Version/s: 4.2.1

Time Tracking:
Original Estimate: 2h
Original Estimate - 2h
Remaining Estimate: 1h
Time Spent - 1h Remaining Estimate - 1h
Time Spent: 1h
Time Spent - 1h Remaining Estimate - 1h

Environment:
$ uname -sr && aCC -V
HP-UX B.11.31
aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]

Resolution Date: 14/Mar/08 11:22 PM


 Description  « Hide
We're getting a bunch of warnings from this file,. a couple of them looking serious:
"$(TOPDIR)/src/iso2022.cpp", line 470: warning #4232-D: conversion from "mbstate_t *" to a more strictly aligned type "unsigned short *" may cause misaligned access
          _RWSTD_REINTERPRET_CAST (ISO_2022_STATE_INDEX_T*, &state);
          ^

"$(TOPDIR)/include/loc/_localedef.h", line 160: remark #4298-D: 64 bit migration: addition result could be truncated before cast to bigger sized type
          return (wtolower_off - wtoupper_off) / sizeof (__rw_upper_elm);
                               ^

"$(TOPDIR)/include/loc/_localedef.h", line 164: remark #4298-D: 64 bit migration: addition result could be truncated before cast to bigger sized type
          return (wmask_off - wtolower_off) / sizeof (__rw_lower_elm);
                            ^

"$(TOPDIR)/include/loc/_localedef.h", line 168: remark #4298-D: 64 bit migration: addition result could be truncated before cast to bigger sized type
          return charmap_off - codeset_off;
                             ^

"$(TOPDIR)/include/loc/_localedef.h", line 172: remark #4298-D: 64 bit migration: addition result could be truncated before cast to bigger sized type
          return wtoupper_off - charmap_off;
                              ^

"$(TOPDIR)/include/loc/_localedef.h", line 122: remark #4299-D: 64 bit migration: multiply result could be truncated before cast to bigger sized type
          return *(_RWSTD_ARRAY_ELM (wchar_t, wchar_off, off * 2));
                                                             ^

"$(TOPDIR)/include/loc/_localedef.h", line 128: remark #4298-D: 64 bit migration: addition result could be truncated before cast to bigger sized type
          return *(_RWSTD_ARRAY_ELM (wchar_t, wchar_off, off * 2 + 1));
                                                                 ^

"$(TOPDIR)/src/iso2022.cpp", line 764, procedure __rw::__rw_ksc5601_to_iso2022: warning #20200-D: Potential null pointer dereference through esc is detected (null definition:$(TOPDIR)/src/iso2022.cpp, line 677)

"$(TOPDIR)/src/iso2022.cpp", line 1541, procedure __rw::__rw_ucs4_to_interm: warning #20206-D: Out of bound access (In expression "&db_array[(long long)i]", array "db_array" [$(TOPDIR)/src/iso2022.cpp:1525] (type: struct _noname [6]) has element range [0 .. 5], reading element range [0 .. 11].)

"$(TOPDIR)/src/iso2022.cpp", line 1586, procedure __rw::__rw_ucs4_to_interm: warning #20206-D: Out of bound access (In expression "&db_array[(long long)i]", array "db_array" [$(TOPDIR)/src/iso2022.cpp:1525] (type: struct _noname [6]) has element range [0 .. 5], reading element range [0 .. 11].)


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor added a comment - 14/Mar/08 11:22 PM
The warning's gone from nightly builds.

Farid Zaripov added a comment - 17/Apr/08 10:04 AM