Jumping in, though it seems well answered above...
A virus is written specifically for an operating system. Every computer has an operating system (including that fancy DSLR...) that it uses to make the components work together with the human. There are viruses written for Windows, the 'nix builds, and even osX. There has even been a recent spate of viruses targeting cell phones, especially the iphone.
As a general rule, the more complicated an operating system is, the more likely there are to be holes, unpatched vulnerabilities, and other stuff... And the return on investment for a virus is based on the number of devices it can infect. As a business decision it makes sense to target the largest market segment (windows PC's). The virus builds a bot net, and the net is used to perpetrate online protection rackets, spam, credit card phishing... that sort of thing. There's next to no market for targeting cameras. They just don't get you anything back. Virus writing is a business after all.
OTOH, it most certainly is POSSIBLE to write a virus to attack a camera. More likely, though, as mentioned above, is a virus targeting computers using the camera or memory card as a vector to get in. This isn't really a new idea - there was a batch of digital photo frames out of china a few years back that came from the factory with a virus that auto-installed on any machine the frame was connected to. It then scanned the machine for credit card numbers, and emailed them back home.
Other manufacturers have been targeted as well - USB thumb drives, things like that. I'm told (by a military friend) that the Pentagon had a bit of an issue with infected thumb drives. The virus appeared to have been placed by a Chinese agent on behalf of Beijing as an espionage attempt.
But don't let it worry you...