Archive for February 2009

Code Smells

February 17, 2009

Here is a little snippet of C code which recently reared up its ugly head and bit me, these sort of problems are often termed Code Smells. No, I’m not going to say who wrote it… #ifdef LCFG_OS_rh9 … #endif #if defined(LCFG_OS_fc3) || defined(LCFG_OS_fc5) || defined(LCFG_OS_fc6) || defined(LCFG_OS_sl5) … #endif There are a couple of […]

Running commands from perl

February 13, 2009

I think most people are aware of the dangers of running external commands from Perl, particularly when they involve variables storing user input. Over the years multiple methods have been provided to make things safer, such as system() taking a list of command parts and not using the shell rather than the original single string-based […]