-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
device.c track length of buffer when buidling xml
As we are building up the xml, keep track of the length of the (remaining) buffer, and check it at the end to make sure we didn't overflow. This does change the max length of the channel xml description from MAX_size_t to MAX_ssize_t. Worse case, that is from 64k to 32k. The C spec defines the minimum size_t to 16-bits. Nominally, on most modern compilers (where size_t is 32-bits) this would reduce things from 4G to 2G. On Pluto, the largest is 8884 bytes, M2k is 17062, so, even 32k seems pretty large. Signed-off-by: Robin Getz <[email protected]>
- Loading branch information
Showing
2 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters