[svn:parrot] r46591 - trunk/src/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Thu May 13 18:02:59 UTC 2010
Author: NotFound
Date: Thu May 13 18:02:59 2010
New Revision: 46591
URL: https://trac.parrot.org/parrot/changeset/46591
Log:
add a sanity check in imageio shift_string
Modified:
trunk/src/pmc/imageio.pmc
Modified: trunk/src/pmc/imageio.pmc
==============================================================================
--- trunk/src/pmc/imageio.pmc Thu May 13 17:42:14 2010 (r46590)
+++ trunk/src/pmc/imageio.pmc Thu May 13 18:02:59 2010 (r46591)
@@ -634,8 +634,13 @@
PackFile_ConstTable *table = PARROT_IMAGEIO(SELF)->pf_ct;
INTVAL i = STATICSELF.shift_integer();
- if (i >= 0)
+ if (i >= 0) {
+ if (! table->constants[i])
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_MALFORMED_PACKFILE,
+ "Reference to constant not yet unpacked %d", i);
return table->constants[i]->u.string;
+ }
/* XXX
* only got here because constant table doesn't contain the string
More information about the parrot-commits
mailing list