There are various allocations that can't be moved or shrunk.
Provide a global callback struct for this use case instead of
making each caller declare its own dummy struct.
Also fixed ROLO and x1000 installer code which incorrectly
used movable allocations.
Change-Id: I00088396b9826e02e69a4a33477fe1a7816374f1
This overflow is impossible to trigger due to the simple
relationship between binary and hexadecimal numbers.
Change-Id: Ie8243129967abb935a77152a808765318052c979
Instead of using isgraph(), check for legal FAT32 characters
excluding spaces (which are used as field separators).
Change-Id: I291f0acb5f24c558099c237d913f4f35ae06b834
- Only treat EOF as newline if the line is non-empty to
suppress a useless empty line after the end of a file.
- Deal with 0- and 1-byte line buffers safely.
- Remove whitespace stripping and comment handling which
was left over from refactoring. Move it to xf_map_parse()
where it belongs.
Change-Id: I9f05f4e18ca6dd011ca4cd231f0b5ea37c784778
Pass COVERAGE=1 to enable clang-based code coverage and pass
SANITIZE=1 to enable sanitizers. 'make cov' will run the test
app and show a coverage summary.
Change-Id: I8a33e8b78665165d8da1818dc01f495f0c52cf06
This is a new flash installer framework for the X1000 targets.
A bunch of this code is *UNTESTED* but there is an external test
harness which allows the library to be built and tested on a PC.
Once tests are written and the bugs are ironed out this framework
will replace the existing installer code.
New features:
- Update tarballs are MD5-checksummed to guarantee integrity.
- The flash map is no longer fixed -- updates are self describing and
carry a map file which specifies the areas to update.
- Can take full or partial backups with checksums computed on the fly.
- Supports an additional verification mode which reads back data after
writing to ensure the flash contents were not silently corrupted.
Change-Id: I29a89190c7ff566019f6a844ad0571f01fb7192f
This is a major overhaul of the library with some API
changes and ease of use improvements, particularly for
creating new archives.
The updated functionality is intended to support a new
X1000 installer framework.
Change-Id: Icf192bb546831231d49303fbf529ef1c1ce8905c
didn't set the genre string to null on case entry
means read failure would leave genre string indeterminate
add explicit NULL & leave genre uninitialized
Change-Id: I1452a0b57985646c982ec80755d0df9d03745f1e
* direct use of memcpy() instead of ci->memcpy() in flac and mod
* uninitialized variable in mpegplayer
Change-Id: I2d08682d5f66c319780e69e3ff63d600c61d8f5a
Encountered a file with ~600K of ID3v1 headers.
Optimize the potential overhead by minimizing reverse seeks.
Change-Id: I972dbf1af1c36659f19c7ab4eed0b9149c642880
The old code would seek forward by the frame length, expecting to see a
frame header there, perform a validity check, and then seek back to the
current header.
Unfortunately this doesn't handle situations where there is extra padding
between the frames, leading us to potentially read garbage, causing the
validity tests to fail and rejecting the file outright.
Instead, keep track of the previous valid header/position, and if we find
"valid" headers in a row return the first after seeking back to it.
This change allows the file referenced in FS13299 to be properly parsed, but
further work is needed to get the file to be playable. (file reports itself
as layer 1, variable bit rate, variable sample rate!)
Change-Id: I85f61a6360cc041a172db4b7a6b5516e5b60ceee
This is an MIT-licensed library for reading and writing v7 format
tar files. The version here is my fork, which fixes security issues
in the original code (it hasn't been updated in 4 years, probably
abandoned by the author).
Change-Id: I86d41423dacc46e9fa0514b4fc7386a96c216e86
As per multiple user requests:
https://forums.rockbox.org/index.php/topic,53319.msg
The acceptable size for id3v2 fields currently maxes out at
240 bytes on targets with more than 2MB of memory.
The comments field, especially for Podcasts, can sometimes
contain significantly more characters than Rockbox allows.
The limit for devices with more than 8MB of memory
is increased to 500 bytes for individual fields, and
to 1800 bytes for the buffer containing all fields.
Change-Id: I4593372229158756f102f67bcc4a43e64f632d58
Since that encompasses _all_ of our native targets in a post-archos world,
either replace it with #if (CONFIG_PLATFORM & PLATFORM_NATIVE) or
delete it altogher as appropriate.
Change-Id: I9128a456e850d5c96a9e05806aad3acd923f90c5
Some flac encoded files contain junk that our decoder
picked up
upstream has some sign and overflow fixes too
Change-Id: I5857b2fe56906a48f04944cdfee8fe2306f2c3fd
I think the assumption is that during playback, the DSP is already running
so it assumes PBE needs to be flushed before it is properly enabled.
Change-Id: I2bac3d02c80f97c8d9ce26a575175f6344a8e86a
mp4 files can have multiple 'mdat' chunks. This is common for
audiobooks, where there is often a secondary mdat containing the
chapter names, but it's also legal to have multiple mdat chunks
for a single logical "track"
This confuses the mp4 metadata parser, which assumes there is
only a single mdat, and always uses the last mdat seen to
determine the "filesize" of the data we're trying to decode.
Work around this by appending each mdat's size to result in the final
"filesize"
Change-Id: I3e7a7efb0f05ef965e8d77f79e450c957524a480