Patch (software)

from Wikipedia, the free encyclopedia

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 .

For programs (or, more rarely, operating systems ), updates are also offered via the Internet, which can be downloaded and imported.

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.

Under Unix , program code patches are created with the diff program . The patch program , originally written by Larry Wall , can be used to automatically apply a patch.

Most popular version control systems use patches to record changes between file versions.

Patch packages

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.



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 ).

Community patch

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.

See also

Individual evidence

  1. Duden - German Universal Dictionary, 7th edition. Dudenverlag, Mannheim 2011, ISBN 978-3-411-05507-4 , page 1315.
  2. Felicia M. Nicastro: Security Patch Management . CRC Press, 2011, ISBN 978-1-4398-2500-6 , pp. 19th ff . ( limited preview in Google Book search).