Skip Menu |

This queue is for tickets about the CPU-Z80-Assembler CPAN distribution.

Report information
The Basics
Id: 59195
Status: resolved
Priority: 0/
Queue: CPU-Z80-Assembler

People
Owner: Nobody in particular
Requestors: spoon.reloaded [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 2.09
Fixed in: (no value)



Subject: eval() should be changed to hex()
in CPU-Z80-Assembler-2.09/t/opcodes.t: chr(eval "0x$_") should be changed to chr(hex) because eval is dangerous
On Thu Jul 08 01:45:31 2010, https://launchpad.net/~newacct wrote: Show quoted text
> in CPU-Z80-Assembler-2.09/t/opcodes.t: > chr(eval "0x$_") > should be changed to > chr(hex) > because eval is dangerous
You didn't read the code did you. If you did, you would have realised that the eval is *not* dangerous. For it to be dangerous, it would have to be eval()ing untrusted data, which it isn't. To make it eval something unexpected, you need to edit one of the files, at which point you might as well edit the test suite itself to do something dangerous instead of editing the data that it works on. Using hex() instead of eval() would be a minor efficiency improvement, but that's all.
Resolved in 2.11, although not worth it.