Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] ada-lang, possible_user_operator_p, null pointer
@ 2007-08-11 20:43 msnyder
  2007-08-14  4:27 ` Joel Brobecker
  0 siblings, 1 reply; 5+ messages in thread
From: msnyder @ 2007-08-11 20:43 UTC (permalink / raw)
  To: gdb-patches; +Cc: brobecker

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

If type1 is null (which is checked for earlier), this line will
dereference it.

Also, I'm not sure what the CONCAT operator is, but is it
possible that the OR at the beginning of the same line
should be an AND?  Just checking...


[-- Attachment #2: 56.txt --]
[-- Type: text/plain, Size: 1254 bytes --]

2007-08-11  Michael Snyder  <msnyder@access-company.com>

	* ada-lang.c (possible_user_operator_p): Guard against NULL.

Index: ada-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.c,v
retrieving revision 1.100
diff -p -r1.100 ada-lang.c
*** ada-lang.c	6 Aug 2007 20:07:44 -0000	1.100
--- ada-lang.c	11 Aug 2007 20:39:20 -0000
*************** possible_user_operator_p (enum exp_opcod
*** 3536,3542 ****
          ((TYPE_CODE (type0) != TYPE_CODE_ARRAY
            && (TYPE_CODE (type0) != TYPE_CODE_PTR
                || TYPE_CODE (TYPE_TARGET_TYPE (type0)) != TYPE_CODE_ARRAY))
!          || (TYPE_CODE (type1) != TYPE_CODE_ARRAY
               && (TYPE_CODE (type1) != TYPE_CODE_PTR
                   || (TYPE_CODE (TYPE_TARGET_TYPE (type1)) 
  		     != TYPE_CODE_ARRAY))));
--- 3536,3542 ----
          ((TYPE_CODE (type0) != TYPE_CODE_ARRAY
            && (TYPE_CODE (type0) != TYPE_CODE_PTR
                || TYPE_CODE (TYPE_TARGET_TYPE (type0)) != TYPE_CODE_ARRAY))
!          || (type1 != NULL && TYPE_CODE (type1) != TYPE_CODE_ARRAY
               && (TYPE_CODE (type1) != TYPE_CODE_PTR
                   || (TYPE_CODE (TYPE_TARGET_TYPE (type1)) 
  		     != TYPE_CODE_ARRAY))));

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-15 18:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-11 20:43 [PATCH] ada-lang, possible_user_operator_p, null pointer msnyder
2007-08-14  4:27 ` Joel Brobecker
2007-08-14  5:20   ` Joel Brobecker
2007-08-14 18:33     ` msnyder
2007-08-15 18:39       ` [commit] ada-lang, possible_user_operator_p, null pointer (take 2) Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox