mirror_corosync/exec
Jim Meyering fd20c4e799 logsys.c: avoid possibility of buffer overrun
* exec/logsys.c (strcpy_cutoff): Add buf_len parameter, and never
write more than this number of bytes into "dest".
Change type of "cutoff" parameter from int to size_t.
Sentinel value changes from -1 to 0.
(log_printf_to_logs): Adapt to those changes.
Reverse condition of test so the much-shorter block is the "if-block".
Factor out a common subexpression for readability.
Exit the loop if output_buffer_idx ever reaches sizeof(output_buffer).

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2178 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-12 08:35:17 +00:00
..
apidef.c Add libnss security support to corosync. 2009-04-25 14:05:27 +00:00
apidef.h remove empty lines at end-of-file 2009-04-22 08:04:06 +00:00
coroipcs.c Remove useless APIs from coroipcs.c related to handling of overload 2009-04-26 01:20:09 +00:00
coroparse.c Remove mempool since it is unused and isn't going to be a feature in 2009-04-23 19:39:20 +00:00
coropoll.c Remove saHandleXXX and friends and use hdb instead. 2009-04-22 17:43:54 +00:00
crypto.c remove empty lines at end-of-file 2009-04-22 08:04:06 +00:00
crypto.h remove all trailing blanks 2009-04-22 08:03:55 +00:00
logsys.c logsys.c: avoid possibility of buffer overrun 2009-05-12 08:35:17 +00:00
main.c Fix logging date format and add missing daemon name 2009-05-11 08:17:53 +00:00
main.h add request_shutdown call to coroapi. 2009-04-23 19:34:26 +00:00
mainconfig.c Remove mempool since it is unused and isn't going to be a feature in 2009-04-23 19:39:20 +00:00
mainconfig.h remove all trailing blanks 2009-04-22 08:03:55 +00:00
Makefile.am Minor fixes to the build process on OSX 2009-04-27 14:51:05 +00:00
objdb.c Remove saHandleXXX and friends and use hdb instead. 2009-04-22 17:43:54 +00:00
quorum.c Reworking of include file dependencies. 2009-04-22 09:01:30 +00:00
quorum.h quorum.h (quorum_set_quorate_fn_t): make first param const 2009-04-08 06:43:03 +00:00
schedwrk.c Remove saHandleXXX and friends and use hdb instead. 2009-04-22 17:43:54 +00:00
schedwrk.h Add missing schedwrk files. 2009-04-18 14:42:09 +00:00
service.c Reworking of include file dependencies. 2009-04-22 09:01:30 +00:00
service.h service.[ch]: remove 7 const-related warnings 2009-03-30 21:10:45 +00:00
sync.c Remove most iovector-ized functionality from totem and only make one malloc 2009-05-09 17:23:17 +00:00
sync.h continue pulling previous thread: mostly constification 2009-04-08 06:44:59 +00:00
timer.c Remove mempool since it is unused and isn't going to be a feature in 2009-04-23 19:39:20 +00:00
timer.h timer.c: connect with its published prototypes 2009-04-01 09:32:40 +00:00
tlist.h remove all trailing blanks 2009-04-22 08:03:55 +00:00
totemconfig.c Add libnss security support to corosync. 2009-04-25 14:05:27 +00:00
totemconfig.h remove all trailing blanks 2009-04-22 08:03:55 +00:00
totemip.c totemip.h: const'ify 2009-04-07 13:03:07 +00:00
totemmrp.c Remove most iovector-ized functionality from totem and only make one malloc 2009-05-09 17:23:17 +00:00
totemmrp.h Remove most iovector-ized functionality from totem and only make one malloc 2009-05-09 17:23:17 +00:00
totemnet.c totemnet.c: Make totemnet_initialize definition match just-changed decl. 2009-05-11 17:40:42 +00:00
totemnet.h Remove most iovector-ized functionality from totem and only make one malloc 2009-05-09 17:23:17 +00:00
totempg.c Remove most iovector-ized functionality from totem and only make one malloc 2009-05-09 17:23:17 +00:00
totemrrp.c Remove most iovector-ized functionality from totem and only make one malloc 2009-05-09 17:23:17 +00:00
totemrrp.h Remove most iovector-ized functionality from totem and only make one malloc 2009-05-09 17:23:17 +00:00
totemsrp.c Remove most iovector-ized functionality from totem and only make one malloc 2009-05-09 17:23:17 +00:00
totemsrp.h Remove most iovector-ized functionality from totem and only make one malloc 2009-05-09 17:23:17 +00:00
util.c Kill all asserts from logsys and handle proper error return 2009-04-22 09:14:23 +00:00
util.h Reworking of include file dependencies. 2009-04-22 09:01:30 +00:00
version.h Split openais and corosync tree into two seperate repositories. 2008-08-05 13:23:46 +00:00
vsf_quorum.c Remove useless APIs from coroipcs.c related to handling of overload 2009-04-26 01:20:09 +00:00
vsf_ykd.c Reworking of include file dependencies. 2009-04-22 09:01:30 +00:00
vsf.h remove all trailing blanks 2009-04-22 08:03:55 +00:00
wthread.c remove all trailing blanks 2009-04-22 08:03:55 +00:00
wthread.h remove all trailing blanks 2009-04-22 08:03:55 +00:00