Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#Actualnfactorial

Posted 06 June 2013 - 05:41 AM

Yes, that's why you need to validate what you're using to index into the table. If you've already validated the input is fine, you can't do anything arbitrary no matter what they've sent you (because you've validated that you can't).

 

There is nothing inherently more dangerous in the given example over a switch statement, as long as your code has the correct validation there (which the original post already points out).

 

n!


#1nfactorial

Posted 06 June 2013 - 05:40 AM

Yes, that's why you need to validate what you're using to index into the table. If you've already validated it's the input is fine, you can't do anything arbitrary no matter what they've sent you (because you've validated that you can't).

 

There is nothing inherently more dangerous in the given example over a switch statement, as long as your code has the correct validation there (which the original post already points out).

 

n!


PARTNERS