Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove a TODO note, and put in some basic bounds-checking code. I sti…

…ll don't like this but it's slightly better.
  • Loading branch information...
commit 61b84beef982d0010e752f3b7b3eaa529de37654 1 parent d8d5cce
@Whiteknight Whiteknight authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/pmc/multisub.pmc
View
3  src/pmc/multisub.pmc
@@ -61,8 +61,9 @@ pmclass MultiSub
provides invokable {
VTABLE STRING * get_string() {
- /* TODO: No bounds-checking. This is not safe. */
PMC * const sub0 = VTABLE_get_pmc_keyed_int(INTERP, SELF, 0);
+ if (PMC_IS_NULL(sub0))
+ return STRINGNULL;
STRING * const name = VTABLE_get_string(INTERP, sub0);
return name;
}
Please sign in to comment.
Something went wrong with that request. Please try again.