Function pointer in database? oO



  • 'nuff said.

    I asked "on a scale of 1 to 10, where 1 is WTF!! and 10 is WTF!!!!!!!!!!!!!!!!!!!!!!!!!!!!!, where does storing a function pointer in a database rate?" on IRC and got responses of:
            18
            i cant fit enough !!'s in the character buffer
    so yeah. Probably front page material when I can find and obsfucate the relevant code. The perpetrator is a TDWTF reader too, though I gather he's come a long way since he made this bit of code.



  • Wowch. I'd really like to see that code...

    Though, in what language did the guy write that? I can't think of many scenarios where you'd do (non-generic) database queries in a language that supports actual pointers. And a web app hard-coded in C(++)? That sounds like a sub-WTF all of its own...



  • I bet this was to do with COM - when I first tried COM I found it was far to easy to end up passing pointers between processes and this was often useless! I'm pretty sure I wrote some to files!

    Then I sat down and learnt how COM works!



  • Modern version of Windows use virtual memory, so in theory all of an apps functions would remain at the same address on every run.


    Good luck if you rebuild the app though.


  • Winner of the 2016 Presidential Election

    @Thief^ said:

    Modern version of Windows use virtual memory, so in theory all of an apps functions would remain at the same address on every run.

    Good luck if you rebuild the app though.

    Windows Vista makes use of address space layout randomization to help prevent return-to-libc attacks.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.