From 975003265cfa47bbf2658154f332c50fd26b1703 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 13 Feb 2007 00:02:35 +0000 Subject: [PATCH] Exit with an error instead of an assert if a file name is too long when building a .deb package. Closes: #393069 --- ChangeLog | 4 ++++ debian/changelog | 2 ++ dpkg-deb/build.c | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 22d5eadd..c613ddc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-02-13 Guillem Jover + + * dpkg-deb/build.c (getfi): Exit with an error instead of an assert. + 2007-02-13 Guillem Jover * dpkg-deb/dpkg-deb.h (MAXFILENAME): New macro. diff --git a/debian/changelog b/debian/changelog index 87210077..37f784d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,8 @@ dpkg (1.14.0) UNRELEASED; urgency=low * Fix confusing bottom status lines in dselect, unifying them by removing the method or package name and capitalizing. Closes: #9085 * Check proper error value returned by BZ2_bzerror. Closes: #410605 + * Exit with an error instead of an assert if a file name is too long when + building a .deb package. Closes: #393069 [ Updated dpkg translations ] * Romanian (Eddy Petrișor). diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c index 50fb6327..e1aa9afe 100644 --- a/dpkg-deb/build.c +++ b/dpkg-deb/build.c @@ -106,7 +106,9 @@ static struct _finfo* getfi(const char* root, int fd) { break; i++; - assert(i < MAXFILENAME); + + if (i >= MAXFILENAME) + ohshit(_("file name '%.50s...' is too long"), fn + rl + 1); } fi=(struct _finfo*)malloc(sizeof(struct _finfo)); -- 2.39.5