A patch ( masculine , seldom neuter ; from English to patch = patch, mend and patch = [put on] patch, patchwork in the meaning of repair or improvement ) is a correction delivery for software or data from the end user's point of view to correct errors - mostly to close known security gaps - or to retrofit previously non-existent functions. Sometimes changes to software are installed without the knowledge of the buyer or user. Some manufacturers, such as Microsoft ( Windows ), like these improvements to be called updates and service packs if they consist of a large number of combined patches (sometimes after weekly patch days). The term was already in use at a time when corrections to (minimal) software could still be made on punched cards by punching or sealing individual holes.
A patch is a bug fix for executable programs or operating systems and can also contain small functional extensions. It is usually offered for a limited time.
- A bug fix corrects errors in the program source code that can cause malfunctions.
- A hotfix is a particularly important, very urgent troubleshooting for executable programs or operating systems.
- An update ( English update ) changes the existing functionality of executable programs and often includes bug fixes.
Targets for patches
Patch for binary programs
A patch for a binary program usually replaces one or more files with a new version. Binary program patches are mostly released by proprietary software manufacturers for their own programs. Patches for binary programs are also widespread among software pirates. Here, a patch is usually used to bypass copy protection . Patches for modifying games are also common in the computer game scene .
At the time of the CP / M operating system , screen and printer control were not part of the operating system itself. The adaptation in the form of escape sequences or small machine programs therefore had to be made in the code of the user program, which already provided for reserved patch areas. Examples are WordStar , dBASE and SuperCalc . Patching was mostly done with the help of a debugger .
Source code patch
A patch for source code only contains the changed lines in the program code. The most common formats are "Context-diff" and "Unified diff". These patches are used to document and communicate the changes. Patches are an essential part of software development.
Most popular version control systems use patches to record changes between file versions.
The manufacturers often combine several patches into a "package" which the administrator should install as a whole. These packages have different names depending on the manufacturer. A distinction is also made between cumulative (often also referred to as cumulative ) packages and non-cumulative packages. With cumulative packages, only the latest one needs to be installed because it contains the patches of the previous packages. With non-cumulative packages, you have to install all packages in the correct order.
- Hewlett-Packard : Patchkits for Tru64 UNIX , cumulative
- Microsoft : Service Packs for Windows , cumulative
- SAP : Support Packages for SAP R / 3 , not cumulative
- Sun Microsystems : Patch Clusters for Solaris , cumulative
- Oracle : patch sets , cumulative
Patches are not only created by the original software manufacturer, but sometimes also by third parties with different motivations.
A patch that is used to bypass restrictions or bans is called a " crack ". The binary code of a mostly commercial program z. B. to protect the sensitive original CD so that it works without copy protection. This change is prohibited in most countries ( see also: Legal position of software cracks ).
Software is no longer improved or maintained by the original manufacturer and rightholder if support has ended, a successor product is sold or the company no longer exists. In these cases it can happen that the user community tries to maintain the maintenance of the software with patches, if this is not prohibited for licensing reasons.
- Microsoft Update Service, Update Rollup
- Patch (Unix)
- Kernel live patching
- End of software life (EOL)