The present invention relates generally to computer software, and more
specifically, to a system and method of foiling buffer-overflow and
alien-code attacks. The invention protects computers from such attacks by
encoding data placed in storage, and varying the encodings used in
different storage areas. When the data is needed by a software
application, the data is simply decoded in a complementary manner. This
prevents storage areas written according to one usage from being used
effectively for some other purpose. The method of the invention can be
done in a number of ways. For example, a "protector" engine can be placed
between a software application and memory, or the function calls in the
software application itself, could be amended to include encoding and
decoding. Other embodiments and alternatives are also described.