summaryrefslogtreecommitdiffstats
path: root/src/utils.c
AgeCommit message (Collapse)AuthorFilesLines
21 hoursutils: Handle realloc() failure in fdlist_add()Gravatar Comtea041-3/+15
fdlist_add() assigned the results of realloc() directly to list->owners and list->fds and doubled the capacity unconditionally, so on out-of-memory the arrays were leaked and the following stores wrote through a NULL pointer, crashing the daemon. Only update the pointers and the capacity once the reallocation succeeded. If it fails, log an error and leave the fd out of this poll() round; the main loop rebuilds the list on every iteration. A capacity of 0 (after fdlist_free()) now grows to 4 instead of staying 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2021-09-01Remove common code in favor of new libimobiledevice-glueGravatar Nikias Bassen1-248/+0
2018-11-29utils: Fix free on invalid pointerGravatar Nikias Bassen1-1/+1
Credit to tjps see: #100 https://github.com/libimobiledevice/usbmuxd/pull/100
2017-10-29Better error handling when saving pair recordsGravatar Frederik Carlier1-10/+32
plist_write_to_filename and buffer_write_to_filename now return 0 if the actual write operation failed (e.g. because access is denied to the file), and set errno if required.
2017-07-17utils: Use autoconf to check for availability of clock_gettime()Gravatar Nikias Bassen1-1/+1
2016-01-28Add a static clock_gettime() substitute for OS X.Gravatar Aaron Burghardt1-0/+33
2014-11-11Use new get_tick_count() to avoid timing issues on packetsGravatar Martin Szulecki1-3/+15
2014-10-06Update and slightly cleanup copyright headersGravatar Martin Szulecki1-21/+20
2014-05-06utils: Add missing plist_read_from_filename() helperGravatar Nikias Bassen1-0/+25
2014-03-24device/utils: move mstime64() into utils since it is generally usefulGravatar Mikkel Kamstrup Erlandsen1-0/+14
2014-01-09utils: add new collection_copy() functionGravatar Nikias Bassen1-0/+8
2014-01-09removed trailing \n from usbmuxd_log() messagesGravatar Nikias Bassen1-1/+1
2014-01-09utils: collection_add don't double capacity but instead increase by a fixed ↵Gravatar Nikias Bassen1-6/+8
amount
2013-12-13add support for reading and writing config and pair record filesGravatar Nikias Bassen1-0/+144
2013-09-17remove libusbmuxd sources and adapt source tree to use autotoolsGravatar Nikias Bassen1-0/+120
libusbmuxd has been split off and is now managed in a separate repository. By the time of this commit, the repository is: git clone http://git.sukimashita.com/libusbmuxd.git