summaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-06 16:28:20 +0000
committerGitHub <noreply@github.com>2020-04-06 16:28:20 +0000
commit5c8cdd005270557ceb91cdafc1eca7c971ee9219 (patch)
treedfc5ca5786438e85ca36d654fe2fc3b37cfd07db /CHANGELOG.md
parent627dff904688ad223558a50bd499207e940e47cd (diff)
parent3c2107bdc221a90b02d3f7118dd96f3496762cd0 (diff)
downloadnix-5c8cdd005270557ceb91cdafc1eca7c971ee9219.zip
Merge #1205
1205: unistd: avoid infinite loop caused by reserve_double_buffer_size r=asomers a=stevendanna Functions such as Group::from_anything use reserve_double_buffer_size in a loop, expecting it to return ERANGE if the passed limit is reached. However, the returned vector is passed as pointer to a libc function that writes data into memory and doesn't update the length of the Vec. Because of this, the previous code would never return ERANGE and the calling loops would never exit if they hit a case where the required buffer was larger than the maximum buffer. This fixes the problem by checking the capacity rather than the length. Signed-off-by: Steven Danna <steve@chef.io> Co-authored-by: Steven Danna <steve@chef.io>
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d367ccb2..1f76bfaa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
(#[1198](https://github.com/nix-rust/nix/pull/1198))
### Fixed
+
+- Fixed a bug in nix::unistd that would result in an infinite loop
+ when a group or user lookup required a buffer larger than
+ 16KB. (#[1198](https://github.com/nix-rust/nix/pull/1198))
+
### Removed
## [0.17.0] - 3 February 2020