[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #30639] mxCreateString(NULL) causes segmentati
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #30639] mxCreateString(NULL) causes segmentation fault |
Date: |
Wed, 04 Aug 2010 21:53:14 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/9.10 (karmic) Firefox/3.6.8 |
Follow-up Comment #3, bug #30639 (project octave):
Your solution works just fine. However, I think the overall implementation
of passed pointers for mex arguments needs to be reworked. For example, I
can produce a segmentation fault with
mxCreateCellArray (1, NULL)
where, again, a pointer is expected. Either all of the mex routines that
accept pointers need better input validation. Or the issue needs to be
reviewed deeper in the code. For example, wherever there is a free or delete
(there aren't many) it might be worth checking that the ptr is not NULL.
I'm attaching another file, test_mex2.cpp, which illustrates that any NULL
pointer passed in will produce a segfault.
(file #21143)
_______________________________________________________
Additional Item Attachment:
File name: test_mex2.cpp Size:0 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?30639>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/