patch-wordole_c 703 B

1234567891011121314151617181920
  1. $OpenBSD: patch-wordole_c,v 1.2 2014/12/02 12:22:05 jasper Exp $
  2. Prevent overflow of atPPSlist[].szName[] (CVE-2014-8123)
  3. http://seclists.org/oss-sec/2014/q4/870
  4. --- wordole.c.orig Fri Aug 26 20:49:57 2005
  5. +++ wordole.c Mon Dec 1 17:06:15 2014
  6. @@ -259,6 +259,11 @@ bGetPPS(FILE *pFile,
  7. }
  8. tNameSize = (size_t)usGetWord(0x40, aucBytes);
  9. tNameSize = (tNameSize + 1) / 2;
  10. + if (tNameSize >= sizeof(atPPSlist[0].szName)) {
  11. + werr(0, "PPS %d appears to be invalid.", iIndex);
  12. + atPPSlist = xfree(atPPSlist);
  13. + return FALSE;
  14. + }
  15. vName2String(atPPSlist[iIndex].szName, aucBytes, tNameSize);
  16. atPPSlist[iIndex].ucType = ucGetByte(0x42, aucBytes);
  17. if (atPPSlist[iIndex].ucType == 5) {