Improper buffer handling and poor parsing algorithms cause their fair
share of problems, as does the failure to understand the differences between signed and
unsigned data. In developing a proper patch, it is always wise to investigate all of the
underlying assumptions that the original programmer made regarding data handling
and verify that each assumption is properly accounted for in the program??™s implementation.
This is the reason that it is always desirable to work in a cooperative manner with
the program developers. Few people are better suited to understand the code than the
original authors.
Patch Development and Use
When working with source code, the two most common programs used for creating and
applying patches are the command-line tools diff and patch. Patches are created using
the diff program, which compares one file to another and generates a list of differences
between the two.
diff diff reports changes by listing all lines that have been removed or replaced
between old and new versions of a file. With appropriate options, diff can recursively
descend into subdirectories and compare files with the same names in the old and new
directory trees. diff output is sent to standard out and is usually redirected in order to
create a patch file.
Pages:
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849