aboutsummaryrefslogtreecommitdiffstats
path: root/util/iobuf.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-02-01Fix possible sign extension problem with newer compilers.Werner Koch1-1/+1
* cipher/des.c (READ_64BIT_DATA): Cast to u32 before shifting by 24. * cipher/blowfish.c (do_encrypt_block): Ditto. (do_decrypt_block): Ditto. * cipher/camellia.c (CAMELLIA_RR8): Ditto. * cipher/cast5.c (do_encrypt_block): Ditto. (do_decrypt_block): Ditto. (do_cast_setkey): Ditto. * cipher/twofish.c (INPACK): Ditto. * util/iobuf.c (block_filter): Ditto. -- For cipher/des.c Reported-by: Balint Reczey <[email protected]> See commit 57af33d9e7c9b20b413b96882e670e75a67a5e65 for details. Signed-off-by: Werner Koch <[email protected]>
2016-01-26g10: Fix iobuf API of filter function for alignment.NIIBE Yutaka1-29/+45
* include/iobuf.h (struct iobuf_struct): Remove DESC. * util/iobuf.c (iobuf_desc): New. (print_chain, iobuf_close, iobuf_open, iobuf_fdopen, iobuf_sockopen) (iobuf_create, iobuf_append, iobuf_openrw, iobuf_ioctl) (iobuf_push_filter2, pop_filter, underflow): Use iobuf_desc. (file_filter, sock_filter, block_filter): Fill the description. * g10/armor.c, g10/cipher.c, g10/compress-bz2.c, g10/compress.c, g10/encode.c, g10/encr-data.c, g10/mdfilter.c, g10/pipemode.c, g10/progress.c, g10/textfilter.c: Likewise. -- Newer GCC warns against possible alignment difference of pointers. This change can silence those warnings. Signed-off-by: NIIBE Yutaka <[email protected]> (backported from 2.1 commit 3f52c7da3940ec06572270d511000dc7fe9c27d2)
2015-01-13avoid future chance of using uninitialized memoryDaniel Kahn Gillmor1-1/+1
* util/iobuf.c: (iobuf_open): initialize len -- Cherry-pick 367b073ab5f439ccf0750461d10c69f36998bd62. In iobuf_open, IOBUFCTRL_DESC and IOBUFCTRL_INIT commands are invoked (via file_filter()) on fcx, passing in a pointer to an uninitialized len. With these two commands, file_filter doesn't actually do anything with the value of len, so there's no actual risk of use of uninitialized memory in the code as it stands. However, some static analysis tools might flag this situation with a warning, and initializing the value doesn't hurt anything, so i think this trivial cleanup is warranted. Debian-Bug-Id: 773469
2013-10-04gpg: Limit the nesting level of I/O filters.Werner Koch1-32/+43
* until/iobuf.c (MAX_NESTING_FILTER): New. (iobuf_push_filter2): Limit the nesting level. -- This is a more general fix for the nested compression packet bug. In particular this helps g10/import.c:read_block to stop pushing compression filters onto an iobuf stream. Signed-off-by: Werner Koch <[email protected]>
2010-09-28Minor changes to help the VMS portWerner Koch1-2/+20
2010-05-12Fix bug 1179Werner Koch1-1/+1
2009-08-18Fix compiler size warning for debug outputWerner Koch1-1/+1
2009-03-20* iobuf.c (fd_cache_synchronize): New. fsync() a file in cache.David Shaw1-8/+53
(iobuf_ioctl): Called here, for ioctl 4. (fd_cache_invalidate): Pass return code from close() back to iobuf_ioctl().
2008-08-19Fix possible NULL argument to printfWerner Koch1-13/+21
2007-10-23Switched to GPLv3.Werner Koch1-4/+2
Updated gettext.
2006-07-31Fixed bug 479. Not a real good fix but a reliable one which limits possibleWerner Koch1-4/+21
breakage of other partys of the code.
2006-04-11Add new regression testWerner Koch1-8/+14
2005-10-05Renamed g10.c to gpg.cWerner Koch1-7/+48
Filelength fixes for W32.
2005-07-27Converted all m_free to xfree etc.Werner Koch1-50/+50
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2004-12-20(handle_iconv_error): Turn diagnostics into warningsWerner Koch1-1/+1
so that gpg does not return with failure. (native_to_utf8, utf8_to_native): Ditto.
2004-12-06(fd_cache_strcmp): New. Use whenever we compareWerner Koch1-3/+23
filenames for the fd_cache. This is needed because the backslash is an alias for a slash under W32. Reported by Tobias Winkler.
2004-11-032004-11-03 Timo Schulz <[email protected]>Timo Schulz1-15/+15
* strgutil.c (w32_strerror): New. * ttyio.c (init_ttyfp, tty_printf, do_get): Use it here. * iobuf.c (fd_cache_open, file_filter): Likewise. (iobuf_seek, translate_file_handle): Likewise.
2004-10-14(iobuf_get_fd): Removed double check on directfp andWerner Koch1-1/+1
cats it to FILEP becuase directfp is actually a void *. Notes by Stefan.
2004-10-13* configure.ac: Actually name the option --disable-finger and notWerner Koch1-0/+22
http. Add option --enable-selinux-support. * logger.c (g10_log_error_f, g10_log_fatal_f, g10_log_info_f) (g10_log_debug_f, print_prefix_f): Removed. * iobuf.c (iobuf_is_pipe_filename): New. (iobuf_get_fd): New.
2004-10-13* configure.ac: Actually name the option --disable-finger and notWerner Koch1-0/+10
http. * openfile.c (overwrite_filep, make_outfile_name, open_outfile) (open_sigfile): Use iobuf_is_pipe_filename to check for pipes so that special filesnames are taken into account. This is bug 327. * tdbdump.c (import_ownertrust): Ditto. * sign.c (write_plaintext_packet): Ditto. * progress.c (handle_progress): Ditto. * plaintext.c (handle_plaintext): Ditto. * encode.c (encode_simple, encode_crypt): Ditto. * iobuf.c (iobuf_is_pipe_filename): New. * fileutil.c (is_file_compressed): Use it here.
2004-09-30* iobuf.c (pop_filter): Make static.David Shaw1-1/+1
* dotlock.c (destroy_dotlock): New. Remove the handle from the list of locks. (release_dotlock): Don't act if we don't have any locks at all. From Werner on stable branch.
2004-09-09* photoid.c: Include ttyio.h.Werner Koch1-0/+37
* parse-packet.c (skip_rest): Removed. Changed all callers to use the new iobuf_skip_reset. Orginal patch by Florian Weimer. * iobuf.c (iobuf_skip_rest): New. Orginal patch by Florian Weimer. Added new argument PARTIAL.
2004-03-04* iobuf.c (block_filter): Remove the old gpg indeterminate length mode.David Shaw1-84/+6
(iobuf_set_block_mode, iobuf_in_block_mode): Removed as superfluous.
2004-03-01* iobuf.c (block_filter): Properly handle a partial body stream that endsDavid Shaw1-1/+8
with a 5-byte length that happens to be zero.
2003-12-30* g10u.c: Dead code. Remove.David Shaw1-0/+1
* Makefile.am: Don't compile g10u.c. * iobuf.c (block_filter): Properly handle a partial body stream that ends with a 5-byte length.
2003-08-28* dotlock.c, http.c, iobuf.c, simple-gettext.c, srv.c, srv.h, strgutil.c,David Shaw1-10/+10
ttyio.c, w32reg.c: s/__MINGW32__/_WIN32/ to help building on native Windows compilers. Requested by Brian Gladman. From Werner on stable branch. * http.c (connect_server): Oops - forgot to freeaddrinfo().
2003-07-10* iobuf.c (check_special_filename): Replaced is isdigit by digitpDavid Shaw1-1/+1
to avoid passing negative values and potential locale problems. Problem noted by Christian Biere. * strgutil.c (strlwr,strcasecmp,strncasecmp): Make sure we don't pass a negative value. * miscutil.c (scan_isodatestr): Ditto.
2003-05-24* argparse.c, dotlock.c, fileutil.c, iobuf.c, miscutil.c,David Shaw1-73/+71
simple-gettext.c, errors.c, http.c, memory.c, secmem.c, ttyio.c: Edit all preprocessor instructions to remove whitespace before the '#'. This is not required by C89, but there are some compilers out there that don't like it.
2002-12-26* iobuf.c (iobuf_flush): Only print debug info if debugging is on.David Shaw1-1/+2
2002-11-06* w32reg.c (read_w32_registry_string): Fixed expanding of the environmentDavid Shaw1-0/+4
buffer; didn't worked at all. Reported by Thijmen Klok. From Werner on stable branch. * secmem.c (secmem_free, secmem_term): Use wipememory2() instead of memset() to overwrite secure memory * iobuf.c (direct_open): Handle mode 'b' if O_BINARY is available. From Werner on stable branch. * fileutil.c: Comment from stable branch.
2002-08-30* iobuf.c (block_filter): Removed the assert, so that one can passWerner Koch1-13/+9
the first character of a message and use the block filter for non partial length encoded packets.
2002-06-29Update head to match stable 1.0David Shaw1-168/+779
2000-09-18See ChangeLog: Mon Sep 18 16:35:45 CEST 2000 Werner KochWerner Koch1-3/+26
2000-07-28See ChangeLog: Fri Jul 28 18:19:11 CEST 2000 Werner KochWerner Koch1-2/+14
2000-07-25See ChangeLog: Tue Jul 25 17:44:15 CEST 2000 Werner KochWerner Koch1-2/+2
2000-07-14See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch1-6/+36
2000-01-27See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner KochWerner Koch1-19/+20
2000-01-24See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner KochWerner Koch1-46/+46
1999-09-03See ChangeLog: Fri Sep 3 10:06:06 CEST 1999 Werner KochV0-9-11Werner Koch1-1/+3
1999-08-04See ChangeLog: Wed Aug 4 10:34:46 CEST 1999 Werner KochV0-9-10Werner Koch1-2/+2
1999-06-26See ChangeLog: Sat Jun 26 12:15:59 CEST 1999 Werner KochWerner Koch1-9/+15
1999-06-01See ChangeLog: Tue Jun 1 16:01:46 CEST 1999 Werner KochWerner Koch1-8/+34
1999-05-31See ChangeLog: Mon May 31 19:41:10 CEST 1999 Werner KochWerner Koch1-32/+46
1999-05-22See ChangeLog: Sat May 22 22:47:26 CEST 1999 Werner KochWerner Koch1-0/+1
1999-05-17See ChangeLog: Mon May 17 21:54:43 CEST 1999 Werner KochWerner Koch1-4/+7
1999-02-24See ChangeLog: Wed Feb 24 11:07:27 CET 1999 Werner KochWerner Koch1-5/+5
1999-02-19See ChangeLog: Fri Feb 19 15:49:15 CET 1999 Werner KochWerner Koch1-2/+21
1999-02-16See ChangeLog: Tue Feb 16 14:10:02 CET 1999 Werner KochWerner Koch1-24/+24
1999-02-10See ChangeLog: Wed Feb 10 17:15:39 CET 1999 Werner KochWerner Koch1-2/+6