Commit Graph

436 Commits

Author SHA1 Message Date
Hallvard Furuseth
19b8065922 More ITS#6215: Fix va_arg integer types for ber_scanf "bei" & ber_printf "BX" 2009-07-29 23:03:10 +00:00
Hallvard Furuseth
8b3bb91e93 More ITS#6215: Fix ber_scanf(,"mMvVW",) cleanup on error:
Parse args correctly and free up memory.
Also set some lengths=0 and remove unneeded ptr==NULL tests before frees.
2009-07-29 22:38:19 +00:00
Hallvard Furuseth
886520f193 More ITS#6215: Free data to the memory context used to allocate it 2009-07-29 22:10:45 +00:00
Hallvard Furuseth
b6bad3e995 More ITS#6215:
Reject indefinite-length format in ber_skip_tag().  localize *len.
Reject broken and too large bitstrings in ber_get_bitstringa().
Simplify a number of functions somewhat - no functionality changes.
Remove unnecessary tests and ber_tag updates after ber_skip_tag().
2009-07-29 21:47:54 +00:00
Hallvard Furuseth
29aa1d07c7 For ITS#6215: No need to maintain ber->ber_usertag except at ber_printf "!" 2009-07-29 17:21:54 +00:00
Hallvard Furuseth
4bed42ae5a For ITS#6215: Do not expose obsolete Seqorset. Note ber_write(,,,nonzero) is gone. 2009-07-29 17:07:52 +00:00
Hallvard Furuseth
36d2dc034d More ITS#6215 -
Speedup & less memory allocation:
  Simplify the work to encode tag, length, integer/enum, sequence/set.
  Drop struct seqorset and allocations of it.  Replace BerElement.ber_sos.
  Drop ber_write(,,,nonzero) support. Callers, if any, need to be rewritten.
  Make ber_log_sos_dump() and ber_sos_dump() stubs, they could no longer work.
Fix ber_write() buffer overrun after ber_start_seqorset().
Check overflow and max sizes, e.g. for functions returning int size.
Some cleanup, and handwaves in the direction of supporting CHAR_BIT>8.
Add/fix comments and a few descriptive types/macros.
2009-07-29 16:49:42 +00:00
Hallvard Furuseth
53f884ac1d Remove useless asserts that will be re-assert()ed before the variable is used 2009-07-29 15:06:28 +00:00
Hallvard Furuseth
12a6f3e055 ITS#6215: Fix buffer overrun and write through NULL pointer 2009-07-29 14:57:09 +00:00
Hallvard Furuseth
4b01f4b23a ITS#6080 again: simplify ber_strnlen, don't use strnlen, revert _GNU_SOURCE 2009-05-01 03:10:25 +00:00
Hallvard Furuseth
4e3f04edc3 Fix previous fix: Don't #ifdef HAVE_STRNLEN before portable.h #defines that 2009-05-01 02:17:28 +00:00
Hallvard Furuseth
a59f93f32f Update previous commit: #define _GNU_SOURCE if needed for strnlen() 2009-05-01 02:11:42 +00:00
Pierangelo Masarati
85b47ab0e7 define and use ber_strnlen() (ITS#6080); please regenerate configure and include/portable.hin 2009-04-29 11:38:31 +00:00
Howard Chu
d39bd12e9f Skip redundant PACKETS logging 2009-03-13 23:10:37 +00:00
Howard Chu
07e79f26a4 Revert prev commit 2009-02-10 21:29:56 +00:00
Pierangelo Masarati
2b95e7d288 partially addresses an issue with ITS#5931 2009-02-10 12:44:12 +00:00
Kurt Zeilenga
4af9eb9715 Update copyright notices 2009-01-22 00:40:04 +00:00
Hallvard Furuseth
4028c83c67 ber_decode_oid(): Fix typo in comment 2008-08-06 13:36:53 +00:00
Howard Chu
aebcd93721 ITS#5580: Revert prev commit, failed on byte-at-a-time input. Different
approach used here.
2008-07-02 01:33:15 +00:00
Howard Chu
14f1138ab5 ITS#5580 fix length decoding, verified with PROTOS 2008-06-27 02:36:41 +00:00
Kurt Zeilenga
c890c96d13 Happy New Year (belated) 2008-01-08 00:19:56 +00:00
Howard Chu
2701782cba ITS#5224 add any necessary socket libraries 2007-11-12 07:59:54 +00:00
Howard Chu
bdac543b3b Cleanup debug calls 2007-10-18 01:35:07 +00:00
Howard Chu
670febf7d5 ITS#5105 from Alexey Melnikov @ isode 2007-08-24 21:58:20 +00:00
Hallvard Furuseth
973a2b41b7 Make LDAP_MEMORY_DEBUG a bitmask. #define LDAP_MEMORY_DEBUG_ASSERT. ITS#4990. 2007-07-24 20:53:23 +00:00
Hallvard Furuseth
17afb33c19 ITS#5010: OID encode/decode fixes and paranoia. #define LBER_OID_COMPONENT_MAX. 2007-07-23 12:57:23 +00:00
Hallvard Furuseth
e1d42189fa ITS#4990: Fix LDAP_MEMORY_DEBUG and LDAP_MEMORY_DEBUG=0 compilation.
Declare ber_int_meminuse.  Fix '#if' -> '#ifdef' LDAP_MEMORY_DEBUG.
2007-07-04 22:55:24 +00:00
Hallvard Furuseth
bfdb026fab ITS#5007: Remove void* pointer arithmetic, that's a gcc extension. 2007-06-09 23:41:36 +00:00
Hallvard Furuseth
3750520f6f Fix HP-UX crash: Replace socklen_t with ber_socklen_t from configure. ITS#4629. 2007-06-09 23:35:20 +00:00
Hallvard Furuseth
bbc719ca56 ITS#4948: '#if <undefined macro>' -> '#ifdef' warning cleanup 2007-05-09 18:17:10 +00:00
Hallvard Furuseth
545b5555fb ber_decode_oid(), ber_encode_oid(): cast bv_val to unsigned char* 2007-04-04 17:51:10 +00:00
Howard Chu
c6df30118f ITS#4893 fix prev commit 2007-03-25 12:18:06 +00:00
Howard Chu
7426ab07fc ITS#4893 define LDAP_PF_LOCAL_SENDMSG in <ac/socket.h> if a message must
be sent to transmit client credentials. Buffer the message data.
2007-03-25 04:40:22 +00:00
Howard Chu
724784e6cb Use AC_MEMCPY 2007-03-25 04:31:34 +00:00
Howard Chu
b213588f95 Add options for ber_get_stringbv() to omit NUL-terminator, to allow
non-destructive in-place parsing
2007-03-23 15:27:38 +00:00
Howard Chu
9fe8f72310 Add DER OID encoder/decoder 2007-03-20 15:10:16 +00:00
Howard Chu
23ba7dfa12 Add ber_skip_data() to help positioning in structured BER data 2007-03-20 12:29:06 +00:00
Howard Chu
e0ed944be3 Added ber_bvarray_dup_x() 2007-02-05 04:31:38 +00:00
Kurt Zeilenga
da6d9eb046 happy new year 2007-01-02 20:00:42 +00:00
Howard Chu
57c329a3af ITS#4606 errno is not per-thread on WIN32, always use WSAGet/SetLastError
(with notable exceptions: ignore tests for EINTR which winsock never sets)
2006-09-14 06:35:34 +00:00
Pierangelo Masarati
8f1c5c4df5 improve previous commit 2006-06-15 01:47:39 +00:00
Pierangelo Masarati
8b76e15d28 fix ber_bvreplace() in case dst is NULL and src is empty 2006-06-15 01:42:25 +00:00
Hallvard Furuseth
02bb67044b Cleanup since last patch (remove unused label) 2006-04-13 22:13:42 +00:00
Pierangelo Masarati
dfc8e7f6b8 better fix for ITS#4483 2006-04-09 22:29:42 +00:00
Pierangelo Masarati
23c620a637 don't leak a BerElement 2006-04-08 17:34:00 +00:00
Kurt Zeilenga
cbc11c9233 unifdef -DLDAP_NULL_IS_NULL 2006-02-14 23:18:12 +00:00
Kurt Zeilenga
acbb5cf689 Happy new year! 2006-01-03 23:11:52 +00:00
Pierangelo Masarati
eb734a167b add severity-aware logging (ITS#4282) 2005-12-27 16:29:37 +00:00
Pierangelo Masarati
4a6f4369c0 don't malloc empty strings for matched, error 2005-11-12 18:42:03 +00:00
Howard Chu
10c94f4e58 Cleanup lbo_valid / meminuse / memfuncs 2005-11-12 18:26:17 +00:00