[acassen/keepalived] 2a3bb3: Fix memory allocation in parser

Alexandre Cassen <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <52e75d6cf1e26_23510add441238e4@hookshot-fe9-pe1-prd.aws.github.net.mail>
  Branch: refs/heads/master
  Home:   https://github.com/acassen/keepalived
  Commit: 2a3bb34f01b921cfc1a9855b70c7ea2950bc73d5
      https://github.com/acassen/keepalived/commit/2a3bb34f01b921cfc1a9855b70c7ea2950bc73d5
  Author: Ryan O'Hara <[email protected]>
  Date:   2014-01-16 (Thu, 16 Jan 2014)

  Changed paths:
    M lib/parser.c

  Log Message:
  -----------
  Fix memory allocation in parser

The set_value function was incorrectly using sizeof (char *) when
allocation and reallocating memory.


  Commit: 1dbc4ea4d6753f58cc933a11f137ec1068644f91
      https://github.com/acassen/keepalived/commit/1dbc4ea4d6753f58cc933a11f137ec1068644f91
  Author: Ryan O'Hara <[email protected]>
  Date:   2014-01-16 (Thu, 16 Jan 2014)

  Changed paths:
    M keepalived/vrrp/vrrp.c

  Log Message:
  -----------
  Fix memory allocation for MD5 digest

The vrrp_in_chk_ipsecah and vrrp_build_ipsecah functions were
incorrectly using sizeof (unsigned char *) when allocating memory for
the MD5 digest.


  Commit: 8408f9c1885db18edca92660fa3cc9e6ca9dd57b
      https://github.com/acassen/keepalived/commit/8408f9c1885db18edca92660fa3cc9e6ca9dd57b
  Author: Ryan O'Hara <[email protected]>
  Date:   2014-01-16 (Thu, 16 Jan 2014)

  Changed paths:
    M lib/vty.c

  Log Message:
  -----------
  Fix memory leak in vty_read_config

If vty_use_backup_config returns NULL, free any memory that has been
allocated before returning.


  Commit: a3eec41beef27ee346064e987b73801bb40e30a7
      https://github.com/acassen/keepalived/commit/a3eec41beef27ee346064e987b73801bb40e30a7
  Author: Ryan O'Hara <[email protected]>
  Date:   2014-01-16 (Thu, 16 Jan 2014)

  Changed paths:
    M lib/parser.c

  Log Message:
  -----------
  Fix memory leak in check_include

The check_include function should always free the allocated strvec.


  Commit: 30e18a15dc5715fb7f76d0f0adfc3af8ffe96bac
      https://github.com/acassen/keepalived/commit/30e18a15dc5715fb7f76d0f0adfc3af8ffe96bac
  Author: Ryan O'Hara <[email protected]>
  Date:   2014-01-16 (Thu, 16 Jan 2014)

  Changed paths:
    M lib/html.c

  Log Message:
  -----------
  Check content length before allocating memory

Since extract_content_length should return 0 if CONTENT_LENGTH is not
found in the buffer, this check should be done before allocating
memory. This avoids unnecessary malloc/free calls and fixes a
potential memory leak.


  Commit: 456fee85ac4998eec2f5f34abf60f6ffd1248a18
      https://github.com/acassen/keepalived/commit/456fee85ac4998eec2f5f34abf60f6ffd1248a18
  Author: Ryan O'Hara <[email protected]>
  Date:   2014-01-16 (Thu, 16 Jan 2014)

  Changed paths:
    M lib/vty.c

  Log Message:
  -----------
  Free memory if realloc fails in vty_out

If realloc returns NULL, free the original memory before returning.


  Commit: 6407182bc98c4a36792e09214a84488307a5cb75
      https://github.com/acassen/keepalived/commit/6407182bc98c4a36792e09214a84488307a5cb75
  Author: Ryan O'Hara <[email protected]>
  Date:   2014-01-16 (Thu, 16 Jan 2014)

  Changed paths:
    M lib/vty.c

  Log Message:
  -----------
  Remove redundant close from vty_use_backup_config

The sav file descriptor is closed after read, so there is no need to
close it again is chmod operation fails.


  Commit: 5dca336c298bf159af147abf88d1aa6833ad8df1
      https://github.com/acassen/keepalived/commit/5dca336c298bf159af147abf88d1aa6833ad8df1
  Author: Ryan O'Hara <[email protected]>
  Date:   2014-01-16 (Thu, 16 Jan 2014)

  Changed paths:
    M keepalived/vrrp/vrrp_vmac.c

  Log Message:
  -----------
  Remove unnecessary netlink rtattr structures

Both netlink_link_setmode and netlink_link_add_vmac have rtattr
structures that are no needed. The addattr_l function will handle
adding the rtattr to the message. Also, this patch removes incorrect
void pointer arithmetic when setting rta_len.


  Commit: a5e40b8d48935192a4e9f1cb5e407dfad0e9ecb2
      https://github.com/acassen/keepalived/commit/a5e40b8d48935192a4e9f1cb5e407dfad0e9ecb2
  Author: Alexandre Cassen <[email protected]>
  Date:   2014-01-27 (Mon, 27 Jan 2014)

  Changed paths:
    M keepalived/vrrp/vrrp.c
    M keepalived/vrrp/vrrp_vmac.c
    M lib/html.c
    M lib/parser.c
    M lib/vty.c

  Log Message:
  -----------
  Merge pull request #67 from rohara/devel

Fix various memory allocation bugs and resource leaks.


Compare: https://github.com/acassen/keepalived/compare/73aea090e25f...a5e40b8d4893

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.