Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: msnyder@sonic.net
To: gdb-patches@sourceware.org
Subject: [OB] cli/cli-script.c, null ptr guard
Date: Thu, 28 Jun 2007 21:51:00 -0000	[thread overview]
Message-ID: <13902.12.7.175.2.1183067383.squirrel@webmail.sonic.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: arg --]
[-- Type: application/octet-stream, Size: 1057 bytes --]

2007-06-28  Michael Snyder  <msnyder@access-company.com>

	* cli/cli-script.c (build_command_line): Add null pointer guard 
	(Coverity).
	
Index: cli/cli-script.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-script.c,v
retrieving revision 1.40
diff -p -r1.40 cli-script.c
*** cli/cli-script.c	27 Jan 2007 12:30:46 -0000	1.40
--- cli/cli-script.c	28 Jun 2007 21:47:25 -0000
*************** build_command_line (enum command_control
*** 95,101 ****
      = (struct command_line **) xmalloc (sizeof (struct command_line *)
  					* cmd->body_count);
    memset (cmd->body_list, 0, sizeof (struct command_line *) * cmd->body_count);
!   cmd->line = savestring (args, strlen (args));
    return cmd;
  }
  
--- 95,103 ----
      = (struct command_line **) xmalloc (sizeof (struct command_line *)
  					* cmd->body_count);
    memset (cmd->body_list, 0, sizeof (struct command_line *) * cmd->body_count);
!   if (args != NULL)
!     cmd->line = savestring (args, strlen (args));
! 
    return cmd;
  }
  

             reply	other threads:[~2007-06-28 21:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-28 21:51 msnyder [this message]
2007-06-28 22:15 ` Daniel Jacobowitz
2007-06-28 22:27   ` msnyder
2007-06-28 22:48     ` Daniel Jacobowitz
2007-06-28 23:06       ` msnyder
2007-07-01 15:56         ` Daniel Jacobowitz
2007-07-03  1:13           ` msnyder
2007-07-03  1:14             ` msnyder
2007-07-03  1:23               ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13902.12.7.175.2.1183067383.squirrel@webmail.sonic.net \
    --to=msnyder@sonic.net \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox