Branch: refs/heads/3.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 1779c5060f864d646048bc5d1c3377dd1ea3f6a3
      
https://github.com/OpenSIPS/opensips/commit/1779c5060f864d646048bc5d1c3377dd1ea3f6a3
  Author: Liviu Chircu <li...@opensips.org>
  Date:   2024-05-22 (Wed, 22 May 2024)

  Changed paths:
    M cfg_pp.c

  Log Message:
  -----------
  cfg parser: Avoid unnecessary strlen on error case

When getline() returns -1, the @lineptr argument is never safe to read,
nor is this recommended.  So when both rc == -1 and EOF conditions
occur, it is safe to assume we read 0 bytes, without doing the strlen().

Many thanks to Dhiraj Mishra (@RandomDhiraj) for detecting, documenting
and reporting the potential risk of a heap buffer overflow here!

(cherry picked from commit 50b651c230eec5daaf52f8742a9c3dd92123f3d2)



To unsubscribe from these emails, change your notification settings at 
https://github.com/OpenSIPS/opensips/settings/notifications

_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to