diff -pruN 1.6.10-11/debian/changelog 1.6.10-11ubuntu1/debian/changelog
--- 1.6.10-11/debian/changelog	2020-09-24 09:43:32.000000000 +0000
+++ 1.6.10-11ubuntu1/debian/changelog	2020-10-12 12:19:36.000000000 +0000
@@ -1,3 +1,10 @@
+schroot (1.6.10-11ubuntu1) groovy; urgency=medium
+
+  * schroot: util: Fix infinite allocation on error in name queries.
+    LP: #1899414.
+
+ -- Matthias Klose <doko@ubuntu.com>  Mon, 12 Oct 2020 14:19:36 +0200
+
 schroot (1.6.10-11) unstable; urgency=medium
 
   * QA upload.
diff -pruN 1.6.10-11/debian/patches/83bc6d3f99b1aa04a4864faeeb867ed09bae8e55.diff 1.6.10-11ubuntu1/debian/patches/83bc6d3f99b1aa04a4864faeeb867ed09bae8e55.diff
--- 1.6.10-11/debian/patches/83bc6d3f99b1aa04a4864faeeb867ed09bae8e55.diff	1970-01-01 00:00:00.000000000 +0000
+++ 1.6.10-11ubuntu1/debian/patches/83bc6d3f99b1aa04a4864faeeb867ed09bae8e55.diff	2020-10-12 12:19:36.000000000 +0000
@@ -0,0 +1,40 @@
+diff --git a/sbuild/sbuild-util.cc b/sbuild/sbuild-util.cc
+index 11bfa388a1d64404da70639cf92ebfd2539c2153..c7292f9573f868f61c1196918647b55522db32bf 100644
+--- a/sbuild/sbuild-util.cc
++++ b/sbuild/sbuild-util.cc
+@@ -632,7 +632,7 @@ sbuild::passwd::query_uid (uid_t uid)
+ 
+   while ((error = getpwuid_r(uid, this,
+                              &buffer[0], buffer.capacity(),
+-                             &pwd_result)))
++                             &pwd_result)) == ERANGE)
+     {
+       size <<= 1;
+       buffer.reserve(size);
+@@ -655,7 +655,7 @@ sbuild::passwd::query_name (const char *name)
+ 
+   while ((error = getpwnam_r(name, this,
+                              &buffer[0], buffer.capacity(),
+-                             &pwd_result)))
++                             &pwd_result)) == ERANGE)
+     {
+       size <<= 1;
+       buffer.reserve(size);
+@@ -741,7 +741,7 @@ sbuild::group::query_gid (gid_t gid)
+ 
+   while ((error = getgrgid_r(gid, this,
+                              &buffer[0], buffer.capacity(),
+-                             &grp_result)))
++                             &grp_result)) == ERANGE)
+     {
+       size <<= 1;
+       buffer.reserve(size);
+@@ -764,7 +764,7 @@ sbuild::group::query_name (const char *name)
+ 
+   while ((error = getgrnam_r(name, this,
+                              &buffer[0], buffer.capacity(),
+-                             &grp_result)))
++                             &grp_result)) == ERANGE)
+     {
+       size <<= 1;
+       buffer.reserve(size);
diff -pruN 1.6.10-11/debian/patches/series 1.6.10-11ubuntu1/debian/patches/series
--- 1.6.10-11/debian/patches/series	2020-09-24 09:43:32.000000000 +0000
+++ 1.6.10-11ubuntu1/debian/patches/series	2020-10-12 12:19:36.000000000 +0000
@@ -16,3 +16,4 @@ update_german_schroot_manpage_translatio
 zfs-snapshot-support.patch
 cross.patch
 reproducible-build.patch
+83bc6d3f99b1aa04a4864faeeb867ed09bae8e55.diff
