After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 611591 - gjs_invoke_c_function accesses out_arg_cvalues out of bounds
gjs_invoke_c_function accesses out_arg_cvalues out of bounds
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-02 13:06 UTC by Tommi Komulainen
Modified: 2010-03-02 22:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gi: assert we don't access argument arrays out of bounds (5.36 KB, patch)
2010-03-02 13:06 UTC, Tommi Komulainen
accepted-commit_now Details | Review
gi: calculate out_arg_cvalues length correctly (1.62 KB, patch)
2010-03-02 14:13 UTC, Tommi Komulainen
accepted-commit_now Details | Review

Description Tommi Komulainen 2010-03-02 13:06:39 UTC
Adding assertions suggests invoking test_int_out_utf8 causes out_arg_cvalues
to not have been allocated at all.
Comment 1 Tommi Komulainen 2010-03-02 13:06:41 UTC
Created attachment 155033 [details] [review]
gi: assert we don't access argument arrays out of bounds
Comment 2 Tommi Komulainen 2010-03-02 14:13:28 UTC
Created attachment 155038 [details] [review]
gi: calculate out_arg_cvalues length correctly

Make sure to allocate out_arg_cvalues also for functions with single out
argument and no return value.
Comment 3 Johan (not receiving bugmail) Dahlin 2010-03-02 16:49:59 UTC
Review of attachment 155033 [details] [review]:

Yes
Comment 4 Johan (not receiving bugmail) Dahlin 2010-03-02 16:50:13 UTC
Review of attachment 155038 [details] [review]:

Sure