Commit graph

35703 commits

Author SHA1 Message Date
William Wilgus
93c9d675af folder_select prevent directory handle leak on error
Change-Id: If1617dc92683d7de3d7709b363a593e40fbc5bc8
2021-08-03 03:01:14 +00:00
William Wilgus
429eedf49e list-skinned.c check label pointer for validity
Change-Id: I993ff4a2d5d1c46bad46aae7f46fa4996e67481a
2021-08-03 02:49:17 +00:00
William Wilgus
382b52b120 filetypes.c filesize() guard against negative error values
buffer size is copied to an unsigned int for core_alloc

Change-Id: I7b9ccab79554e55b22d39501ccb779036913258a
2021-08-02 22:32:15 -04:00
William Wilgus
1fc4a17e1c language.c fix possible buffer overrun
ensure zero termination regardless of data read from lang file

Change-Id: I0da0e787ffb10c9268557812b061cc3c452fbd0a
2021-08-03 00:57:35 +00:00
William Wilgus
3b6c3d769f open_plugins bugfix failure to save
if you added a plugin through the core settings and then used the shortcut
immediately the entry would never get flushed to disk

Change-Id: I62e876bbf0a8fa96acba1cc2582e2563401547f1
2021-08-03 00:31:10 +00:00
William Wilgus
0501af8b06 metadata/flac.c fix potential buffer overrun
Change-Id: Iee12f251455c4fda9d91d10e466d17e5e02046b9
2021-08-02 03:00:01 +00:00
William Wilgus
247731fe8c id3tags.c check for buffer overrun
Change-Id: I74fde8e234fe85abfabefddcea7f10038167c715
2021-08-01 22:29:14 -04:00
William Wilgus
2346a7aa6d playlist_catalog fix strcpy overlap, potential buffer overrun
Change-Id: I7cd1302d2c905992078351a531a5d67fdb465809
2021-08-02 02:27:43 +00:00
William Wilgus
83653023d4 tagcache.c clean up
Change-Id: I658ee345461eeda77cbe856cec46c21dcce7715b
2021-08-02 00:43:52 +00:00
Dana Conrad
a2fd00cf38 Software Volume: Remove sample rounding
Change-Id: I630139333d64b4c8cae86939ecfc52c44a34ffea
2021-08-01 02:20:00 +00:00
William Wilgus
ecf0d631e7 tagcache.c Fix potential buffer overruns WIP
Needs tested

Change-Id: I373b72c72f98777dc7a2d8085e975aeac164c297
2021-07-31 10:44:02 -04:00
William Wilgus
7413442411 tagcache.c WS changes
Change-Id: Ied0fa6010e8bfa82e1c46cafcfb0dec51478d346
2021-07-31 10:26:59 -04:00
James Buren
fad4c75163 crc32/adler32: add full copyright notice to source files
Change-Id: Ifa04be9a6e419772c18b21e81fe1f246f4248af7
2021-07-31 01:30:39 +00:00
James Buren
f32fc84ef6 adler32: import adapted implementation from tinf/zlib
This adds an adapted version of the adler32 algorithm from tinf/zlib
which will be necessary to support ZLIB deflate streams in the future.

Change-Id: Ie60e15acb288acf56a2d44e3d3e912e1b3eb2216
2021-07-30 23:11:49 +00:00
William Wilgus
ee05b8574a playlist.c fix multitude of sins Invalid Control file on USB unplug?
failure to close file handles
reading memory prior to buffer on error
loop variable integer overflow on error

Change-Id: I2893c34cd041d085fd7f56a88cb4cb14131cea11
2021-07-30 00:40:43 -04:00
William Wilgus
f9c5d1fccf open_plugin.c (CORE) File input Bugfixes
Explicitly Null terminate char fields
0 is a valid file descriptor

Change-Id: I0faa9f5ec919ca913bceabf919fbaefcb38c39b9
2021-07-29 23:15:33 -04:00
William Wilgus
ea438ee132 cuesheet.c Fix potential NULL in INDEX parsing
untested

Change-Id: I6160348eeece364e3242f047437877ea34136f9c
2021-07-30 02:30:49 +00:00
Solomon Peachy
7318d393ea libc: atoi() is supposed to return 0 if handed a NULL pointer
Change-Id: I2d77532536ca83e5c9c2d7622a0e672082969f75
2021-07-30 01:41:13 +00:00
Aidan MacDonald
2e9443104f rbcodec: Fix typo in makefile
Hopefully this will fix all those random build failures.

Change-Id: I02ff625c538a21f20b33874b4ab54ed8c893a433
2021-07-25 15:55:36 +01:00
Aidan MacDonald
05d4d6a4f2 Fix remaining yellow from e532714d1f
Change-Id: If0bdd1fb3c8ee3324562638bc4c4181357a8fd53
2021-07-25 14:36:47 +00:00
Aidan MacDonald
148fac6f34 Fix yellow from e532714d1f
Change-Id: I4f49e93fc1efa78874fb76de6a436ad1fc894cc5
2021-07-25 15:22:33 +01:00
Aidan MacDonald
e532714d1f pcm: Remove unused function pcm_play_dma_get_peak_buffer()
Change-Id: Ifd20fb14a22489cdb99154c01f69809a1e70d0c5
2021-07-25 14:07:41 +00:00
Aidan MacDonald
77ec752248 shortcuts: fix file handle leak on OOM condition
Change-Id: If09db7a084d83e9bdeeafb8e8f434fcb502c45c5
2021-07-25 14:53:00 +01:00
Solomon Peachy
d0536b8b6b Fix typo in f8bbe3352c
Change-Id: I02ab35f21c2733efd81a9b97d1c88e283f6187ff
2021-07-24 16:27:49 +00:00
Solomon Peachy
f8bbe3352c rocker: First crack at manual for the AGPTek Rocker
It needs screenshots and slightly better installation instructions

Includes bits shared with other HibyOS platforms

Change-Id: I1c1974143b5badf1aca5c3281556ce553ab1b8a5
2021-07-24 11:16:57 -04:00
Solomon Peachy
a0948ddfa1 Enable building the manual for the FiiO M3K and Shanling Q1
The nightly manual builds previously only included targets that were
marked as "stable" -- The M3K and Q1 are not because they lack rbutil
integration, but we would like to provide the manual builds regardless.

Change-Id: I113e0576753ba6bb1518da2169c1b0b84aebd2f4
2021-07-24 11:16:57 -04:00
Aidan MacDonald
fde6eaa8e1 Add Fiio M3K and Shanling Q1 manuals
Includes installation instructions and a description of Rockbox's
limitations versus the original firmware. Some things are still
missing, notably screenshots for the Q1. The M3K image also needs
to be updated to include the 'select' button.

Change-Id: Ib533206df01925203edeccdd75e1bf22f407e794
2021-07-24 14:07:09 +00:00
William Wilgus
42ba117952 tree.c use strlcpy to avoid buffer ovfl
Change-Id: I6ac4ec6306c2101b11bc0495edd7bbe2717acf9c
2021-07-24 13:44:35 +00:00
William Wilgus
26fd90bb49 talk.c check for proper file load
few sanity checks on voice clip loads

Change-Id: I15fdf05d2964e9f6d00360b9730357dac6054af7
2021-07-23 22:53:25 +00:00
Solomon Peachy
cb92280eca usb_storage: Fix a memset in SCSI_INQUIRY that overflowed its buffer
The funny thing is that the memset() for the field in question was
redundant, as the overall inquiry structure was memset(0) already.

Change-Id: I8bec0c93c9317823ff39cf7133535e3bf58fb987
2021-07-23 00:26:35 +00:00
Solomon Peachy
68294da574 Document an intentional fallthrough in the volume limit menu code
Change-Id: I51d331ff788b73aa84fece63bfdca9c3e08c0384
2021-07-22 23:55:03 +00:00
William Wilgus
1fea6f4670 plugins pong, properties remove dead code
Change-Id: I6645ff850a637343dde129600f0b5eaa2e4f6d31
2021-07-22 23:24:12 +00:00
William Wilgus
363f6595b4 tlsf make ~0 explicitly unsigned ~0u
Change-Id: Ib3220df24fee470416ef813b89bdc5f27e455af7
2021-07-22 23:23:51 +00:00
Aidan MacDonald
00129ac872 Fix battery_bench bug by using a static buffer for stack
Since battery_bench is a TSR (terminate & stay resident) plugin it
cannot allocate the plugin buffer -- various parts of the Rockbox
core make use of it as temporary storage space. The buffer was used
for stack space so this generated false 'Stkov' panics when one of
those in-core users overwrote the buffer.

The default stack size of 1kb is a bit small, so use 4x the default
size to be on the safe side.

This also fixes a minor issue where trying to view OS stack usage
while battery_bench was running would cause audio dropouts, due to
scanning the possibly huge stack with IRQs disabled.

Change-Id: I2e6b76f9946db9090c1af61f7aa0a0dac0698c20
2021-07-22 13:50:26 +00:00
Solomon Peachy
f0e3a36fe4 autoresume: Properly check the path string, not the pointer.
(the pointer is _always_ valid as it's to a fixed buffer)

Change-Id: I88489012b76ed3b5b214cf01da1a6260e259fe87
2021-07-21 15:06:28 +00:00
William Wilgus
8cd4b8da84 talk.c check for 0 talk clips file descriptor leaks & announce_status fix typo
talk.c potential division by zero warrants a check

desowin pointed out multiple fd leaks

announce_status.c dumb typo

Change-Id: Iae99bd64696afdd9585952245a7a04cdc9f88ef1
2021-07-21 11:26:29 +00:00
Aidan MacDonald
48c29e3b3b Fix announce_status usage of plugin buffer
Since this is a TSR plugin, it is not safe to use the plugin buffer.
Convert to using static buffers instead.

Change-Id: Ic5b297468a99d77d56f5b75e52dafabeb80d2f78
2021-07-21 11:26:14 +00:00
William Wilgus
b91ad60d63 timefuncs.c valid_time() should return false if tm == NULL and not try to deref
luckily no one has
yet..

Change-Id: I4117db84b013fa826958aea635daa0a24ee534b6
2021-07-20 23:25:31 +00:00
Aidan MacDonald
966e210e6d Small fixes to kbd_create_layout
- Make the argument const since it's not actually mutated
- Actually return the size of the buffer used since this is what it
  was supposed to do (although no existing callers cared anyway)

Change-Id: I0802071cf63d4af419f427ff54adca50b14918ad
2021-07-20 21:30:55 +01:00
Aidan MacDonald
740a50687f jztool: add support for Shanling Q1 and Eros Q
Change-Id: I8e93162d1a9d82e9d132219f2803b1856d24ae6c
2021-07-20 14:56:58 +00:00
Aidan MacDonald
6f042e91dd FS#13302 - Updated Polish translation (Adam Rak)
Change-Id: I3dd2c75d3e51061b71f3057b1a4ed4f398127ced
2021-07-20 15:24:02 +01:00
Solomon Peachy
df37450f91 talk: Explicitly cast -1 as unsigned before a left shift.
The code is explcitly relying on twos complement numerical represntation
so this just shuts up the compiler and static analysis warnings.

Change-Id: If11cd0a3a4127e8a872a752119d347ac6e09424c
2021-07-20 00:09:33 +00:00
Aidan MacDonald
09fc9ee9a3 sim: change Eros Q native bitmap to a symlink
Change-Id: Id55ef276af0de52d7cbd8c7cdc6da46f171a01bd
2021-07-18 14:15:25 +01:00
Aidan MacDonald
07a3f6bcdb add Eros Q native simulator build
Change-Id: Ifdc882d19020da2e18234d6276409ad3e7efa138
2021-07-18 13:51:30 +01:00
Dana Conrad
3e7a09cb0d New Port: Eros Q Native
What works:
- LCD: 16-bit RGB565
- all buttons, including scrollwheel
- SD Card
- Battery level and charging/not charging status
- USB
- audio
- sample rate switching
- HP / LO detect, with "safe" fixed LO volume -
   LO volume will only be put to user-defined max volume
   if headphones are not present.
- rtc
- Plugins build, tried a couple and they seem OK
- Bootloader, installable to nand via usbboot

What doesn't work:
- Dual Boot
- power on/off has intermittent, low volume audio click
   (sometimes it's completely silent, sometimes there's
    a click)
- Audio uses 16-bit volume scaling, so clicking/popping
   is pretty bad at lower volumes - need 32 bit volume
   scaling, 24 bit I2S data
- USB HID keys not yet defined
- no jztool support

Unknowns:
- Stereo Switch pins: Direction select, AC_DC
   (probably not even hooked up)
- What is the actual purpose of the Stereo Swtich?
- How does the bluetooth module connect?

"Someday" stuff:
- get LCD working at higher bit depth
- Bluetooth

Change-Id: I70dda8fc092c6e3f4352f2245e4164193f803c33
2021-07-18 12:14:35 +00:00
James Buren
64a24591ae crc32: add fast variant of regular crc_32r function
This relies on a macro, CRC32R_FAST, to select which version to
compile with. In tests the fast version is 2x faster at the expense
of requiring 960 more bytes for the lookup table. For now the default
is the space optimized version but in the future I would like to enable
this for ports where we can afford the extra storage and/or memory
requirements.

Change-Id: I25397dadedc3187bb02b2444f8b8ded77c2509b6
2021-07-18 05:17:31 +00:00
Solomon Peachy
cd17decd5a xduoox3ii: Add "Super Slow" filter roll-off
I'm not happy with the proliferation of filter-roll-off options
but I don't have a less ugly solution.

Change-Id: I740fca006fa0c3443a467acfea55b6574d48346b
2021-07-17 08:18:31 -04:00
Solomon Peachy
ec31a2b4ad Fix builds.pm syntax error (1d72d9cf)
Change-Id: I7c7e8e7de16157ecc6535a8b461c12430bd376fb
2021-07-15 15:40:26 -04:00
Aidan MacDonald
1d72d9cf28 builds: add Shanling Q1 to unstable
Change-Id: Ic490b4d68c2faa35dd8cb6733766019aeeb192e7
2021-07-15 18:54:35 +00:00
Solomon Peachy
144d1b1e81 misc: Fix up a few warnings uncovered by LTO
* direct use of memcpy() instead of ci->memcpy() in flac and mod
 * uninitialized variable in mpegplayer

Change-Id: I2d08682d5f66c319780e69e3ff63d600c61d8f5a
2021-07-15 18:37:42 +00:00