openslp-2.0.0-CVE-2017-17833.patch 810 B

1234567891011121314151617181920
  1. diff -up openslp-2.0.0/slpd/slpd_process.c.orig openslp-2.0.0/slpd/slpd_process.c
  2. --- openslp-2.0.0/slpd/slpd_process.c.orig 2018-05-09 13:08:06.185104375 +0200
  3. +++ openslp-2.0.0/slpd/slpd_process.c 2018-05-09 13:07:21.017095089 +0200
  4. @@ -462,6 +462,15 @@ static int ProcessSrvRqst(SLPMessage * m
  5. message->body.srvrqst.srvtype, 23, SLP_DA_SERVICE_TYPE) == 0)
  6. {
  7. errorcode = ProcessDASrvRqst(message, sendbuf, errorcode);
  8. +
  9. + if (result != *sendbuf)
  10. + {
  11. + // The pointer stored at *sendbuf can be modified by a realloc
  12. + // operation in ProcessDASrvRqst(). Fix up the local copy of
  13. + // that pointer if necessary.
  14. + result = *sendbuf;
  15. + }
  16. +
  17. if (errorcode == 0)
  18. {
  19. /* Since we have an errorcode of 0, we were successful,