OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.0 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../pptpd/pptpd-1.3.4-invalid-ip-range.patch
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From 44fb69accd620f858fd04aa76bf06d272829f4e7 Mon Sep 17 00:00:00 2001
  17. From: Christian Wiese <christian.wiese@securepoint.de>
  18. Date: Wed, 24 Aug 2011 14:07:07 +0200
  19. Subject: [PATCH] pptpd: added fix for a segfault when invalid IP ranges are specified in the config file
  20. Origin: http://patch-tracker.debian.org/patch/misc/dl/pptpd/1.3.4-5/pptpd.c
  21. Debian Changelog:
  22. * Apply patch provided by Sergey Naumov to fix a segmentation fault
  23. when invalid IP ranges are specified in the config file (upper <
  24. lower)
  25. ---
  26. pptpd.c | 10 ++++++++++
  27. 1 files changed, 10 insertions(+), 0 deletions(-)
  28. diff --git pptpd-1.3.4.orig/pptpd.c 1.3.4/pptpd.c
  29. index ac009e6..0fbeb65 100644
  30. --- pptpd-1.3.4.orig/pptpd.c
  31. +++ 1.3.4/pptpd.c
  32. @@ -735,6 +735,16 @@ static void processIPStr(int type, char *ipstr)
  33. continue;
  34. }
  35. + if (upper < lower) {
  36. + /* if upper < lower segmantation fault in pptpctrl happens
  37. + * due to enabling pppLocal parameter without providing its value.
  38. + *
  39. + * we can safely use ipstr because it is not modified except
  40. + * of truncating.
  41. + */
  42. + syslog(LOG_ERR, "MGR: Bad %s IP range: %s", (type == LOCAL)?"local":"remote", ipstr);
  43. + exit(1);
  44. + }
  45. for (n = lower; n <= upper; n++) {
  46. sprintf(tmpstr5, "%s%d%s", ip_pre, n, ip_post);
  47. /* Check if the ip address is valid */
  48. --
  49. 1.6.6.2