Commit Graph

689 Commits (ba77fcc8ba50b8f8cb2f90e5f7c7afd8dba0749e)

Author SHA1 Message Date
Felix von Leitner ba77fcc8ba add scan_ulongn, scan_8longn, scan_xlongn, scan_longn, scan_netstring 2014-03-15 22:24:14 +00:00
Felix von Leitner 4ab5705eec fix typo in man page
make use of __uint128_t in scan_ulongn and provide long long based
implementation for 32-bit platforms
2014-03-15 16:04:55 +00:00
Felix von Leitner 69e6c3c6c6 add buffer_tosa check to marshal.c
failed attempt to improve scan_ulongn, results in essentially same code
but the C code looks slighly better so I'm keeping it
2014-03-15 15:18:55 +00:00
Felix von Leitner 21843fedd0 actually increase stralloc.len 2014-03-15 13:27:37 +00:00
Felix von Leitner e058337c40 never close fd 0, 1 or 2 in buffer_close 2014-03-15 13:17:58 +00:00
Felix von Leitner 0fdbaaa085 ignore entities.h 2014-03-15 12:39:19 +00:00
Felix von Leitner 20d899eb7e remove can't happen code and instead force a compile time error 2014-03-15 12:38:10 +00:00
Felix von Leitner f68ede8333 improved code path for typical platforms where there is a wider integer type 2014-03-14 21:32:29 +00:00
Felix von Leitner 1d50536829 catch other potential overflow 2014-03-14 20:35:47 +00:00
Felix von Leitner d74fc233fc get rid of more -Wconversion warnings 2014-03-14 19:42:54 +00:00
Felix von Leitner 765d88a76d SECURITY: check for integer overflow in stralloc_ready 2014-03-14 18:56:07 +00:00
Felix von Leitner 461aa90923 add unit tests for uint* 2014-03-14 18:01:32 +00:00
Felix von Leitner 603801caf1 remove compiler warnings 2014-03-14 18:01:02 +00:00
Felix von Leitner 26b5f1f5bd add rules regarding ent 2014-03-14 12:03:51 +00:00
Felix von Leitner 6e36286b34 get rid of -Wconversion warnings 2014-03-14 02:15:38 +00:00
Felix von Leitner ddec9f403a remove -Wconversion warnings 2014-03-14 01:53:08 +00:00
Felix von Leitner 823f052cbd scan_*longlong now properly abort if the number would not fit 2014-03-14 01:33:03 +00:00
Felix von Leitner 21ca7d8264 remove compiler warnings 2014-03-14 00:25:33 +00:00
Felix von Leitner de26fa9ec3 remove compiler warnings 2014-03-14 00:25:09 +00:00
Felix von Leitner b571a40e68 remove compiler warnings 2014-03-14 00:24:25 +00:00
Felix von Leitner 826abd7560 do proper early abort in the other scan_* routines if the numeric value
is too large
2014-03-14 00:24:02 +00:00
Felix von Leitner 6a1c199a99 $ make WERROR=-Werror now builds with -Werror
add some single char escaping routines to fmt.h
pull in html5 entities from w3c and use those to do a proper scan_html decoding
fix an off-by-one in fmt_to_array
add a ton of unit tests for the fmt routines
2014-03-13 22:25:20 +00:00
Felix von Leitner f03d88a4c7 add some unit tests for the formatting routines 2014-02-25 18:59:20 +00:00
Felix von Leitner 4381f7c6a2 get rid of some compiler warnings 2014-02-25 18:39:59 +00:00
Felix von Leitner e1d937c67b if called with srclen > maxlen, return maxlen not srclen 2014-02-25 18:36:36 +00:00
Felix von Leitner 31ce8647fe if srclen>maxlen, truncate at maxlen 2014-02-25 18:28:06 +00:00
Felix von Leitner 29b9860a37 fmt_strn aborted one byte too late 2014-02-25 18:27:30 +00:00
Felix von Leitner 041e6c5a92 | not + 2014-02-25 17:51:29 +00:00
Felix von Leitner 0482a9ec04 add json encoding routines to textcode 2014-01-28 16:12:39 +00:00
Felix von Leitner 0abea6af07 fix dependencies 2013-10-12 13:50:08 +00:00
Felix von Leitner 212f499313 hopefully this fixes the looping gatling processes 2013-10-01 23:15:51 +00:00
Felix von Leitner 91b2116a38 add scan_netstring 2013-09-09 22:09:07 +00:00
Felix von Leitner 825f9ee219 add scan_ulongn, scan_8longn, scan_xlongn and scan_longn 2013-09-09 20:57:58 +00:00
Felix von Leitner a5dc55208a add man pages for buffer_from* 2013-09-09 19:19:52 +00:00
Felix von Leitner ba62b9d96f add buffer_fromarray, buffer_frombuf 2013-09-09 19:03:52 +00:00
Felix von Leitner addc8cd318 add haveuint128.h
byte.h now defines UNALIGNED_ACCESS_OK on x86
2013-09-09 18:52:29 +00:00
Felix von Leitner b12538cc97 fix compile error 2013-09-09 18:51:24 +00:00
Felix von Leitner fd46d3afc1 add tryuing128.c and ignore haveuint128.h 2013-08-22 23:45:52 +00:00
Felix von Leitner 395dd4c416 make first argument to mmap_unmap const 2013-08-22 23:42:46 +00:00
Felix von Leitner b2eb079c02 add better comments
add fmt_copybytes
2013-08-22 23:41:37 +00:00
Felix von Leitner ba201f6105 define UNALIGNED_ACCESS_OK on x86 2013-08-22 23:38:08 +00:00
Felix von Leitner 20448ccdd8 add haveuint128.h 2013-08-22 23:37:09 +00:00
Felix von Leitner 28180795a9 add more examples 2013-08-22 23:35:34 +00:00
Felix von Leitner 830241e86d add compiletimeassert.h 2013-02-22 11:00:32 +00:00
Felix von Leitner 74a13126d5 add cast so the file compiles in c++ mode too 2012-09-27 01:46:12 +00:00
Felix von Leitner babeb35b1f catch more bad encoding 2012-09-12 20:20:42 +00:00
Felix von Leitner fe4e8dab35 minor update 2012-08-18 01:31:21 +00:00
Felix von Leitner c5a5c2d6bf add byte_equal_notimingattack 2012-05-16 18:02:30 +00:00
Felix von Leitner 9b249f6fa7 add awesome hack in isset.h (comex, Linus Torvalds) 2012-04-17 21:26:31 +00:00
Felix von Leitner 3743706899 add io_fd_canwrite (like io_fd but assume the fd is writable)
save a few syscalls here and there
2012-04-10 21:15:51 +00:00