jadebox - 8:51 pm on Jan 25, 2013 (gmt 0)
I'm sure they don't affect your ranking.
But, I worry about how it looks to someone who happens to follow one of those links. They would see an error on your site. Sometimes a good site will create a bad link to your site. So, some of the bad URLs may get clicks.
Of course, an easy solution is to have a good error page that provides info about your site and links the visitor can follow. But, I've done a little more on some of my sites. My 404 error page is a script which records the "bad" URLs in a database and updates number of times they are visited. Every once in a while, I sort the results to see which URLs are getting the most clicks and I set up a 301 redirect from those URLs to an appropriate web page.