Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 601336 Details for
Bug 842880
ValueError: row sequence has the incorrect number of elements
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch against pygobject-3.2.2 tarball to fix invalid long coercion in _pygi_marshal_from_py_array
ppc64-fixes.patch (text/plain), 3.42 KB, created by
Dave Malcolm
on 2012-07-30 20:30:45 UTC
(
hide
)
Description:
Patch against pygobject-3.2.2 tarball to fix invalid long coercion in _pygi_marshal_from_py_array
Filename:
MIME Type:
Creator:
Dave Malcolm
Created:
2012-07-30 20:30:45 UTC
Size:
3.42 KB
patch
obsolete
>diff -up pygobject-3.3.4/gi/pygi-marshal-from-py.c.ppc64-fixes pygobject-3.3.4/gi/pygi-marshal-from-py.c >--- pygobject-3.3.4/gi/pygi-marshal-from-py.c.ppc64-fixes 2012-07-11 00:14:41.000000000 -0400 >+++ pygobject-3.3.4/gi/pygi-marshal-from-py.c 2012-07-30 20:16:30.840062222 -0400 >@@ -86,6 +86,69 @@ _is_union_member (PyGIInterfaceCache *if > } > > gboolean >+_pygi_marshal_from_py_ssize_t (PyGIArgCache *arg_cache, >+ Py_ssize_t size, >+ GIArgument *arg) >+{ >+ switch (arg_cache->type_tag) { >+ case GI_TYPE_TAG_VOID: >+ case GI_TYPE_TAG_BOOLEAN: >+ case GI_TYPE_TAG_INT8: >+ case GI_TYPE_TAG_UINT8: >+ case GI_TYPE_TAG_INT16: >+ case GI_TYPE_TAG_UINT16: >+ /* Not a sane conversion */ >+ return FALSE; >+ >+ /* Ranges assume two's complement */ >+ case GI_TYPE_TAG_INT32: >+ if (size >= G_MININT32 && size <= G_MAXINT32) { >+ arg->v_int32 = size; >+ return TRUE; >+ } else { >+ /* Overflow */ >+ return FALSE; >+ } >+ >+ case GI_TYPE_TAG_UINT32: >+ if (size >= 0 && size <= G_MAXUINT32) { >+ arg->v_uint32 = size; >+ return TRUE; >+ } else { >+ /* Overflow */ >+ return FALSE; >+ } >+ >+ case GI_TYPE_TAG_INT64: >+ arg->v_int64 = size; >+ return TRUE; >+ >+ case GI_TYPE_TAG_UINT64: >+ if (size >= 0) { >+ arg->v_uint64 = size; >+ return TRUE; >+ } else { >+ return FALSE; >+ } >+ >+ case GI_TYPE_TAG_FLOAT: >+ case GI_TYPE_TAG_DOUBLE: >+ case GI_TYPE_TAG_GTYPE: >+ case GI_TYPE_TAG_UTF8: >+ case GI_TYPE_TAG_FILENAME: >+ case GI_TYPE_TAG_ARRAY: >+ case GI_TYPE_TAG_INTERFACE: >+ case GI_TYPE_TAG_GLIST: >+ case GI_TYPE_TAG_GSLIST: >+ case GI_TYPE_TAG_GHASH: >+ case GI_TYPE_TAG_ERROR: >+ case GI_TYPE_TAG_UNICHAR: >+ /* Not a sane conversion */ >+ return FALSE; >+ } >+} >+ >+gboolean > _pygi_marshal_from_py_void (PyGIInvokeState *state, > PyGICallableCache *callable_cache, > PyGIArgCache *arg_cache, >@@ -916,11 +979,19 @@ array_success: > gint *len_arg = (gint *)state->in_args[child_cache->c_arg_index].v_pointer; > /* if we are not setup yet just set the in arg */ > if (len_arg == NULL) >- state->in_args[child_cache->c_arg_index].v_long = length; >+ if (!_pygi_marshal_from_py_ssize_t (child_cache, >+ length, >+ &state->in_args[child_cache->c_arg_index])) { >+ goto err; >+ } > else > *len_arg = length; > } else { >- state->in_args[child_cache->c_arg_index].v_long = length; >+ if (!_pygi_marshal_from_py_ssize_t (child_cache, >+ length, >+ &state->in_args[child_cache->c_arg_index])) { >+ goto err; >+ } > } > } > >diff -up pygobject-3.3.4/gi/pygi-marshal-from-py.h.ppc64-fixes pygobject-3.3.4/gi/pygi-marshal-from-py.h >--- pygobject-3.3.4/gi/pygi-marshal-from-py.h.ppc64-fixes 2012-04-21 08:00:45.000000000 -0400 >+++ pygobject-3.3.4/gi/pygi-marshal-from-py.h 2012-07-30 19:21:00.960062222 -0400 >@@ -30,6 +30,9 @@ > > G_BEGIN_DECLS > >+gboolean _pygi_marshal_from_py_ssize_t (PyGIArgCache *arg_cache, >+ Py_ssize_t size, >+ GIArgument *arg); > gboolean _pygi_marshal_from_py_void (PyGIInvokeState *state, > PyGICallableCache *callable_cache, > PyGIArgCache *arg_cache,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 842880
: 601336