avahi: fix missing fflush() in address resolution - #113
Merged
Conversation
The function `avahi_resolve_address_with_socket` writes a command to the socket using `fprintf` and immediately attempts to read the response using `fgets`. Fixes downstream report detected using static analyzers rhbz#2362872. Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
Collaborator
|
Thank you for the PR. OpenScanHub should have confirmed that the cppcheck warning is gone but it failed with "It was not possible to download the SRPMs needed for the differential scan." in https://github.com/avahi/nss-mdns/pull/113/checks?check_run_id=63089598851. The other packit jobs appear to have failed due to some Fedora infrastructure issues Failed to download metadata
Error loading local metadata for repository "fedora"
Librepo error: Checksum error /var/lib/mock/fedora-rawhide-ppc64le-1770724223.144416/root/var/cache/dnf/fedora-1c578a7639193129/repodata/a4a958b0c7fa4d6bb042d2419af504793a5dc27eb1bbd21c1803bc2257c7eec5-primary.xml.zck: Unable to read zchunk leadEither way It's now consistent with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The function
avahi_resolve_address_with_socketwrites a command to the socket usingfprintfand immediately attempts to read the response usingfgets.Fixes downstream report detected using static analyzers https://bugzilla.redhat.com/show_bug.cgi?id=2362872.