PackageFileHeapWriter::_UnwriteLastPartialChunk() used ReadData() to
extract the last partial chunk into the pending buffer. This indirectly
calls PackageFileHeapWriter::ReadAndDecompressChunk(), which assumes
data past the last full chunk to come from the pending data buffer.
Since the pending data buffer is not filled in at that point, the call
to ReadAndDecompressChunk() simply did nothing, leaving the object with
a correctly sized but completely nulled pending data buffer. The last
partial chunk of a package would therefore always get corrupted when
updating a package.
Fixes#11306 that provided a reduced test case that happened to corrupt
the only chunk of a package, nulling the .PackageInfo and therefore
making the error more obvious as subsequent parsing of the info failed.
UpdateText must return a pointer to a fixed buffer, whcih BString.String
isn't, if the sctring is modified.
Copy the data to a char* we can use as a fixed position buffer.
This was removed in hrev17147, because our implementation of BMenuItem
does not uses it anymore. However, we must keep it in order to properly
unarchive BMenuFields that were archived in BeOS.
One application that was crashing because of this is VNCViewer.
* Instead of parsing the pattern everytime Format() is called, parse it
only once when the object is created.
* Adjust all callers to make use of the feature and reuse the instance
as much as possible. This also allows calling B_TRANSLATE only once
instead of everytime the formatting needs to be done. We use either a
static instance (when the message pattern is constant) or a field (when
it is not known to be constant).
* Since the BMessageFormat instances are now reused, add locking to
avoid race conditions (ICU itself is thread safe, but the format pattern
is recreated when the locale is changed)
The "j" format pattern selects a 12 or 24 hours clock automatically
depending on the locale, but it doesn't work when the format is forced
in the locale preflet or through the BFormattingConventions API. So we
manually pick either K or H depending on that setting.
This can be used to format complex messages properly. It moves the
complexity of handling plural forms, gender, and anything else needed
into the localizable string, rather than hardcoding it in the code.
This moves the difficulty of handling these things properly to people
doing translations, rather than relying on developers to do it.
Fixes#10755, but our localization must now be updated to make use of
the feature.
* Timezone names have changed. Test the medium time format which doesn't
include them, as we aren't forcing a specific one.
* French date format also changed to use 4 digit year name.
* Includes updated CLDR with many bugfixes, including updates to tzdata
for upcoming reform of Russian timezones which reintroduces DST
* Also includes some gcc2 fixes which were missing from our previous ICU
port and were identified by running the ICU test suite.
The POSIX locale has gLocaleRoster = NULL and relies on the non-wide
version of the implementation. However it doesn't check that the
characters are actually in range which leads to out of bound access and
crashes in __isctype.
Fixes#11322.
We use DEBUG as a #define when debug info is turned on. This conflics
with the use in WebAppInterface, so rename that as ENABLE_DEBUG (I can't
think of a better name for now).
Fixes the debug build.
The web service currently only synchronizes with HaikuPorts. Packages
from 3rd party repositories which were added by the user cannot be rated.
Also, use a warning alert for errors in the UserLoginWindow and
RatePackageWindow.