RTEMS | ftpd.c: Do not use negative socket descriptor (!173)

Joel Sherrill (@joel) gitlab at rtems.org
Wed Aug 7 18:56:51 UTC 2024



Joel Sherrill created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/173

Project:Branches: joel/rtems:ftpd-address-use-of-negative-socket to rtems/rtos/rtems:main
Author:   Joel Sherrill
Assignee: Joel Sherrill



## Summary

ftpd.c: Do not use negative socket descriptor

Coverity CIDs 1592926 and 1592930

The set_socket_timeout() function was called in two places which
potentially could pass in -1. Adding a check to set_socket_timeout()
was a simple solution to protect all path.

Closes #5104,


<!-- Default settings, if it is a dropdown it will set after submission -->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/173
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240807/3cba66ee/attachment.htm>


More information about the bugs mailing list