As we connect lots of gadgets to the Internet, they become vulnerable to hacking. That’s why McAfee is teaming up with Wind River Systems to provide built-in security for embedded devices, or appliances with some computer smarts in them.

This is one more sign that, as we head toward that digital nirvana called “the Internet of things,” we are not going to get there unless we can protect users. The McAfee-Wind River combination will protect everything from car entertainment systems to airline cockpit computers. Wind River’s software is already in a billion devices.

Many of these devices didn’t need the built-in protection before because they weren’t connected to the internet. But now, car makers are building Wi-Fi systems in cars so that you can get your messages or web videos in the car. And any connected device can be attacked, said Ken Klein, president of Wind River Systems.

Dave DeWalt (pictured), chief executive of McAfee, said his company would integrate its software into Wind River’s operating system for embedded gadgets. That’s easy for the companies to do, since they are both owned by Intel.

“This is all about moving beyond the PC,” DeWalt said in a conference call this morning.

But security in the embedded market is very different from PCs, where there’s lots of memory available to have beefy security software running all the time. The embedded software often has as little as 100,000 lines of code, compared to millions of lines of software code for complex applications. That means the embedded security software has to be small and efficient. Klein said that means that protection is limited to something like a “white list.” That is, if the embedded system is only going to connect to a few web sites, you can give it the capability to visit sites that have been scanned and are clean.

The companies made the announcement during the RSA security conference in San Francisco. They said that it’s clear that embedded security will become a big deal in the future. McAfee estimates that the number of connected devices will grow to 50 billion by 2020, as everything from alarm clocks to washing machines become web-connected.

Hackers have already attacked embedded systems such as industrial controls, smart meters, parking meters and other connected devices. That’s creating a big headache for security programmers, since the security software is often more complicated than the main software running on the device itself.

Both Santa Clara-based McAfee and Alameda, Calif.-based Wind River will work together on purpose-built solutions for particular markets. The security solutions will roll out starting this year.