This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=1f89e06f443cc705e9856be527aaf564732c3e4f

commit 1f89e06f443cc705e9856be527aaf564732c3e4f
Author: Guillem Jover <[email protected]>
AuthorDate: Sun Nov 16 16:43:34 2025 +0100

    Stop using length limited format strings (%.255s/%.250s/%.100s/%.50s)
    
    These have historically been used for strings coming from external
    sources, where they might exceed a certain length, which could cause
    truncation of the overall message in emergency situations, where we have
    reserved 4 KiB for that scenario.
    
    The problem is that this will always truncate argument strings that
    currently exceed those limits, which seems worse, as the end of the
    string tends to be the most significant part for example in pathnames.
    For example in Debian there are already packages with pathnames
    exceeding 255 characters (up to 305 characters).
    
    Given that this is should only be an issue with error conditions under
    high memory pressure, where we will most certainly end up aborting due
    to the lack of memory, stop trying to limit those strings in the common
    case.
    
    Changelog: internal
---
 dselect/main.cc             |   4 +-
 dselect/methparse.cc        |  18 +++----
 lib/dpkg/ar.c               |   6 +--
 lib/dpkg/atomic-file.c      |  14 +++---
 lib/dpkg/db-ctrl-access.c   |   2 +-
 lib/dpkg/db-ctrl-format.c   |   2 +-
 lib/dpkg/db-ctrl-upgrade.c  |  10 ++--
 lib/dpkg/db-fsys-divert.c   |   2 +-
 lib/dpkg/db-fsys-files.c    |   6 +--
 lib/dpkg/db-fsys-override.c |   4 +-
 lib/dpkg/dbmodify.c         |  28 +++++------
 lib/dpkg/dump.c             |   2 +-
 lib/dpkg/ehandle.c          |   3 +-
 lib/dpkg/fields.c           |  36 ++++++-------
 lib/dpkg/file.c             |   6 +--
 lib/dpkg/mustlib.c          |   4 +-
 lib/dpkg/options-parsers.c  |   2 +-
 lib/dpkg/options.c          |  10 ++--
 lib/dpkg/parse.c            |  12 ++---
 lib/dpkg/parsehelp.c        |   2 +-
 lib/dpkg/path-remove.c      |   2 +-
 lib/dpkg/subproc.c          |   2 +-
 lib/dpkg/trigdeferred.c     |  22 ++++----
 lib/dpkg/triglib.c          |  34 ++++++-------
 lib/dpkg/utils.c            |   8 +--
 src/deb/build.c             |  18 +++----
 src/deb/extract.c           |  12 ++---
 src/deb/info.c              |  20 ++++----
 src/main/archives.c         | 120 ++++++++++++++++++++++----------------------
 src/main/cleanup.c          |  10 ++--
 src/main/configure.c        |  30 +++++------
 src/main/depcon.c           |  40 +++++++--------
 src/main/enquiry.c          |   2 +-
 src/main/main.c             |   2 +-
 src/main/packages.c         |   4 +-
 src/main/remove.c           |  26 +++++-----
 src/main/script.c           |  14 +++---
 src/main/select.c           |   6 +--
 src/main/unpack.c           |  40 +++++++--------
 src/split/info.c            |  42 ++++++++--------
 src/split/join.c            |   8 +--
 src/split/main.c            |   6 +--
 src/split/queue.c           |  22 ++++----
 src/split/split.c           |   8 +--
 src/statoverride/main.c     |   4 +-
 src/trigger/main.c          |   4 +-
 utils/update-alternatives.c |  10 ++--
 47 files changed, 344 insertions(+), 345 deletions(-)

diff --git a/dselect/main.cc b/dselect/main.cc
index 019572503..6852cd5e7 100644
--- a/dselect/main.cc
+++ b/dselect/main.cc
@@ -295,7 +295,7 @@ set_debug(const struct cmdinfo*, const char *v)
 
        fp = fopen(v, "a");
        if (!fp)
-               ohshite(_("couldn't open debug file '%.255s'\n"), v);
+               ohshite(_("couldn't open debug file '%s'\n"), v);
 
        debug_set_output(fp, v);
        debug_set_mask(dbg_general | dbg_depcon);
@@ -668,7 +668,7 @@ main(int, const char *const *argv)
                        while (me->command && strcmp(me->command, a))
                                me++;
                        if (!me->command)
-                               badusage(_("unknown action string '%.50s'"), a);
+                               badusage(_("unknown action string '%s'"), a);
                        me->fn();
                }
        } else {
diff --git a/dselect/methparse.cc b/dselect/methparse.cc
index 3004b62f3..ec231147b 100644
--- a/dselect/methparse.cc
+++ b/dselect/methparse.cc
@@ -52,7 +52,7 @@ struct method *methods = nullptr;
 static void DPKG_ATTR_NORET
 badmethod(varbuf &pathname, const char *why)
 {
-       ohshit(_("syntax error in method options file '%.250s' -- %s"),
+       ohshit(_("syntax error in method options file '%s' -- %s"),
               pathname.str(), why);
 }
 
@@ -60,7 +60,7 @@ static void DPKG_ATTR_NORET
 eofmethod(varbuf &pathname, FILE *f, const char *why)
 {
        if (ferror(f))
-               ohshite(_("error reading options file '%.250s'"),
+               ohshite(_("error reading options file '%s'"),
                        pathname.str());
        badmethod(pathname, why);
 }
@@ -92,7 +92,7 @@ readmethods(const char *pathbase, dselect_option **optionspp, 
int *nread)
        if (!dir) {
                if (errno == ENOENT)
                        return;
-               ohshite(_("unable to read '%.250s' directory for reading 
methods"),
+               ohshite(_("unable to read '%s' directory for reading methods"),
                        path.str());
        }
 
@@ -114,7 +114,7 @@ readmethods(const char *pathbase, dselect_option 
**optionspp, int *nread)
 
                methodlen = strlen(dent->d_name);
                if (methodlen > IMETHODMAXLEN)
-                       ohshit(_("method '%.250s' has name that is too long "
+                       ohshit(_("method '%s' has name that is too long "
                                 "(%d > %d characters)"),
                               dent->d_name, methodlen, IMETHODMAXLEN);
 
@@ -132,7 +132,7 @@ readmethods(const char *pathbase, dselect_option 
**optionspp, int *nread)
                        pathmeth = path;
                        pathmeth += *ccpp;
                        if (access(pathmeth.str(), R_OK | X_OK))
-                               ohshite(_("unable to access method script 
'%.250s'"),
+                               ohshite(_("unable to access method script 
'%s'"),
                                        pathmeth.str());
                }
                debug(dbg_general,
@@ -143,7 +143,7 @@ readmethods(const char *pathbase, dselect_option 
**optionspp, int *nread)
                pathopts += METHODOPTIONSFILE;
                names = fopen(pathopts.str(), "r");
                if (!names)
-                       ohshite(_("unable to read method options file 
'%.250s'"),
+                       ohshite(_("unable to read method options file '%s'"),
                                pathopts.str());
 
                meth = new method;
@@ -246,7 +246,7 @@ readmethods(const char *pathbase, dselect_option 
**optionspp, int *nread)
                        (*nread)++;
                }
                if (ferror(names))
-                       ohshite(_("error during read of method options file 
'%.250s'"),
+                       ohshite(_("error during read of method options file 
'%s'"),
                                pathopts.str());
                fclose(names);
        }
@@ -272,7 +272,7 @@ getcurrentopt()
        if (!cmo) {
                if (errno == ENOENT)
                        return;
-               ohshite(_("unable to open current option file '%.250s'"),
+               ohshite(_("unable to open current option file '%s'"),
                        methoptfile);
        }
        debug(dbg_general, "getcurrentopt() cmethopt open");
@@ -335,7 +335,7 @@ writecurrentopt()
        file = atomic_file_new(methoptfile, ATOMIC_FILE_NORMAL);
        atomic_file_open(file);
        if (fprintf(file->fp, "%s %s\n", coption->meth->name.str(), 
coption->name.str()) == EOF)
-               ohshite(_("unable to write new option to '%.250s'"),
+               ohshite(_("unable to write new option to '%s'"),
                        file->name_new);
        atomic_file_close(file);
        atomic_file_commit(file);
diff --git a/lib/dpkg/ar.c b/lib/dpkg/ar.c
index 793719916..6f0ce6f3d 100644
--- a/lib/dpkg/ar.c
+++ b/lib/dpkg/ar.c
@@ -66,7 +66,7 @@ dpkg_ar_open(const char *filename)
        else
                fd = open(filename, O_RDONLY);
        if (fd < 0)
-               ohshite(_("failed to read archive '%.255s'"), filename);
+               ohshite(_("failed to read archive '%s'"), filename);
 
        return dpkg_ar_fdopen(filename, fd);
 }
@@ -78,7 +78,7 @@ dpkg_ar_create(const char *filename, mode_t mode)
 
        fd = creat(filename, mode);
        if (fd < 0)
-               ohshite(_("unable to create '%.255s'"), filename);
+               ohshite(_("unable to create '%s'"), filename);
 
        return dpkg_ar_fdopen(filename, fd);
 }
@@ -138,7 +138,7 @@ dpkg_ar_member_get_size(struct dpkg_ar *ar, struct 
dpkg_ar_hdr *arh)
                if (*str == ' ')
                        break;
                if (*str < '0' || *str > '9')
-                       ohshit(_("invalid character '%c' in archive '%.250s' "
+                       ohshit(_("invalid character '%c' in archive '%s' "
                                 "member '%.16s' size"),
                               *str, ar->name, arh->ar_name);
 
diff --git a/lib/dpkg/atomic-file.c b/lib/dpkg/atomic-file.c
index be7a33ef5..57fdd9ac0 100644
--- a/lib/dpkg/atomic-file.c
+++ b/lib/dpkg/atomic-file.c
@@ -62,7 +62,7 @@ atomic_file_open(struct atomic_file *file)
                file->fp = fopen(file->name_new, "w");
        }
        if (file->fp == NULL)
-               ohshite(_("unable to create new file '%.250s'"),
+               ohshite(_("unable to create new file '%s'"),
                        file->name_new);
        fchmod(fileno(file->fp), 0644);
 
@@ -73,11 +73,11 @@ void
 atomic_file_sync(struct atomic_file *file)
 {
        if (ferror(file->fp))
-               ohshite(_("unable to write new file '%.250s'"), file->name_new);
+               ohshite(_("unable to write new file '%s'"), file->name_new);
        if (fflush(file->fp))
-               ohshite(_("unable to flush new file '%.250s'"), file->name_new);
+               ohshite(_("unable to flush new file '%s'"), file->name_new);
        if (fsync(fileno(file->fp)))
-               ohshite(_("unable to sync new file '%.250s'"), file->name_new);
+               ohshite(_("unable to sync new file '%s'"), file->name_new);
 }
 
 void
@@ -86,7 +86,7 @@ atomic_file_close(struct atomic_file *file)
        pop_cleanup(ehflag_normaltidy); /* fopen */
 
        if (fclose(file->fp))
-               ohshite(_("unable to close new file '%.250s'"), file->name_new);
+               ohshite(_("unable to close new file '%s'"), file->name_new);
 }
 
 static void
@@ -108,9 +108,9 @@ void
 atomic_file_remove(struct atomic_file *file)
 {
        if (unlink(file->name_new))
-               ohshite(_("cannot remove '%.250s'"), file->name_new);
+               ohshite(_("cannot remove '%s'"), file->name_new);
        if (unlink(file->name) && errno != ENOENT)
-               ohshite(_("cannot remove '%.250s'"), file->name);
+               ohshite(_("cannot remove '%s'"), file->name);
 }
 
 void
diff --git a/lib/dpkg/db-ctrl-access.c b/lib/dpkg/db-ctrl-access.c
index 4ef1591e5..1bd284d25 100644
--- a/lib/dpkg/db-ctrl-access.c
+++ b/lib/dpkg/db-ctrl-access.c
@@ -49,7 +49,7 @@ pkg_infodb_has_file(struct pkginfo *pkg, struct pkgbin 
*pkgbin,
        else if (errno == ENOENT)
                return false;
        else
-               ohshite(_("unable to check existence of '%.250s'"), filename);
+               ohshite(_("unable to check existence of '%s'"), filename);
 }
 
 void
diff --git a/lib/dpkg/db-ctrl-format.c b/lib/dpkg/db-ctrl-format.c
index 658130dcf..6c55216e5 100644
--- a/lib/dpkg/db-ctrl-format.c
+++ b/lib/dpkg/db-ctrl-format.c
@@ -49,7 +49,7 @@ pkg_infodb_parse_format(const char *file)
                /* A missing format file means legacy format (0). */
                if (errno == ENOENT)
                        return PKG_INFODB_FORMAT_LEGACY;
-               ohshite(_("error trying to open %.250s"), file);
+               ohshite(_("error trying to open %s"), file);
        }
 
        if (fscanf(fp, "%u", &format) != 1)
diff --git a/lib/dpkg/db-ctrl-upgrade.c b/lib/dpkg/db-ctrl-upgrade.c
index 5ab6d7f83..461728294 100644
--- a/lib/dpkg/db-ctrl-upgrade.c
+++ b/lib/dpkg/db-ctrl-upgrade.c
@@ -137,7 +137,7 @@ pkg_infodb_link_multiarch_files(void)
                varbuf_add_str(&newname, filetype);
 
                if (link(oldname.buf, newname.buf) && errno != EEXIST)
-                       ohshite(_("error creating hard link '%.255s'"),
+                       ohshite(_("error creating hard link '%s'"),
                                newname.buf);
                rename_head = rename_node_new(oldname.buf, newname.buf, 
rename_head);
        }
@@ -158,15 +158,15 @@ cu_abort_db_upgrade(int argc, void **argv)
        while (rename_head) {
                next = rename_head->next;
                if (link(rename_head->new, rename_head->old) && errno != EEXIST)
-                       ohshite(_("error creating hard link '%.255s'"),
+                       ohshite(_("error creating hard link '%s'"),
                                rename_head->old);
                if (unlink(rename_head->new))
-                       ohshite(_("cannot remove '%.250s'"), rename_head->new);
+                       ohshite(_("cannot remove '%s'"), rename_head->new);
                rename_node_free(rename_head);
                rename_head = next;
        }
        if (unlink(file->name_new) && errno != ENOENT)
-               ohshite(_("cannot remove '%.250s'"), file->name_new);
+               ohshite(_("cannot remove '%s'"), file->name_new);
 
        atomic_file_free(file);
 }
@@ -192,7 +192,7 @@ pkg_infodb_unlink_monoarch_files(void)
        while (rename_head) {
                next = rename_head->next;
                if (unlink(rename_head->old))
-                       ohshite(_("cannot remove '%.250s'"), rename_head->old);
+                       ohshite(_("cannot remove '%s'"), rename_head->old);
                rename_node_free(rename_head);
                rename_head = next;
        }
diff --git a/lib/dpkg/db-fsys-divert.c b/lib/dpkg/db-fsys-divert.c
index 9a595b3d2..d42bdbc6a 100644
--- a/lib/dpkg/db-fsys-divert.c
+++ b/lib/dpkg/db-fsys-divert.c
@@ -81,7 +81,7 @@ ensure_diversions(void)
 
                if (oialtname->camefrom->divert ||
                    oicontest->useinstead->divert)
-                       ohshit(_("conflicting diversions involving '%.250s' or 
'%.250s'"),
+                       ohshit(_("conflicting diversions involving '%s' or 
'%s'"),
                               oialtname->camefrom->name,
                               oicontest->useinstead->name);
 
diff --git a/lib/dpkg/db-fsys-files.c b/lib/dpkg/db-fsys-files.c
index fcc5d28d7..897dbbfa4 100644
--- a/lib/dpkg/db-fsys-files.c
+++ b/lib/dpkg/db-fsys-files.c
@@ -87,7 +87,7 @@ fsys_list_parse_buffer(struct varbuf *vb, struct pkginfo *pkg)
 
                ptr = memchr(thisline, '\n', loaded_list_end - thisline);
                if (ptr == NULL)
-                       ohshit(_("files list file for package '%.250s' "
+                       ohshit(_("files list file for package '%s' "
                                 "is missing final newline"),
                               pkg_name(pkg, pnaw_nonambig));
 
@@ -100,7 +100,7 @@ fsys_list_parse_buffer(struct varbuf *vb, struct pkginfo 
*pkg)
 
                /* Add the file to the list. */
                if (ptr == thisline)
-                       ohshit(_("files list file for package '%.250s' "
+                       ohshit(_("files list file for package '%s' "
                                 "contains empty filename"),
                               pkg_name(pkg, pnaw_nonambig));
                *ptr = '\0';
@@ -148,7 +148,7 @@ ensure_packagefiles_available(struct pkginfo *pkg)
                onerr_abort--;
                if (pkg->status != PKG_STAT_CONFIGFILES &&
                    dpkg_version_is_informative(&pkg->configversion)) {
-                       warning(_("files list file for package '%.250s' 
missing; "
+                       warning(_("files list file for package '%s' missing; "
                                  "assuming package has no files currently 
installed"),
                                pkg_name(pkg, pnaw_nonambig));
                }
diff --git a/lib/dpkg/db-fsys-override.c b/lib/dpkg/db-fsys-override.c
index 9c23a88be..c69579c10 100644
--- a/lib/dpkg/db-fsys-override.c
+++ b/lib/dpkg/db-fsys-override.c
@@ -146,7 +146,7 @@ ensure_statoverrides(enum statdb_parse_flags flags)
        loaded_list_end = loaded_list + db.st.st_size;
 
        if (fd_read(fileno(db.file), loaded_list, db.st.st_size) < 0)
-               ohshite(_("reading statoverride file '%.250s'"), db.pathname);
+               ohshite(_("reading statoverride file '%s'"), db.pathname);
 
        thisline = loaded_list;
        while (thisline < loaded_list_end) {
@@ -222,7 +222,7 @@ ensure_statoverrides(enum statdb_parse_flags flags)
 
                fnn = fsys_hash_find_node(thisline, FHFF_NONE);
                if (fnn->statoverride)
-                       ohshit(_("multiple statoverrides present for file 
'%.250s'"),
+                       ohshit(_("multiple statoverrides present for file 
'%s'"),
                               thisline);
                fnn->statoverride = fso;
 
diff --git a/lib/dpkg/dbmodify.c b/lib/dpkg/dbmodify.c
index af17c5f0c..041763c2a 100644
--- a/lib/dpkg/dbmodify.c
+++ b/lib/dpkg/dbmodify.c
@@ -71,7 +71,7 @@ ulist_select(const struct dirent *de)
                if (!c_isdigit(*p))
                        return 0;
        if (l > IMPORTANTMAXLEN)
-               ohshit(_("updates directory contains file '%.250s' "
+               ohshit(_("updates directory contains file '%s' "
                         "whose name is too long (length=%d, max=%d)"),
                       de->d_name, l, IMPORTANTMAXLEN);
 
@@ -104,7 +104,7 @@ cleanupdates(void)
 
                        return;
                }
-               ohshite(_("cannot scan updates directory '%.255s'"),
+               ohshite(_("cannot scan updates directory '%s'"),
                        updatesdir);
        }
 
@@ -124,7 +124,7 @@ cleanupdates(void)
                                varbuf_rollback(&updatefn_state);
                                varbuf_add_str(&updatefn, cdlist[i]->d_name);
                                if (unlink(updatefn.buf))
-                                       ohshite(_("failed to remove 
incorporated update file %.255s"),
+                                       ohshite(_("failed to remove 
incorporated update file %s"),
                                                updatefn.buf);
                        }
 
@@ -148,18 +148,18 @@ createimptmp(void)
 
        importanttmp = fopen(importanttmpfile, "w");
        if (!importanttmp)
-               ohshite(_("unable to create '%.255s'"), importanttmpfile);
+               ohshite(_("unable to create '%s'"), importanttmpfile);
        setcloexec(fileno(importanttmp), importanttmpfile);
        for (i = 0; i < 512; i++)
                fputs("#padding\n", importanttmp);
        if (ferror(importanttmp))
-               ohshite(_("unable to fill %.250s with padding"),
+               ohshite(_("unable to fill %s with padding"),
                        importanttmpfile);
        if (fflush(importanttmp))
-               ohshite(_("unable to flush %.250s after padding"),
+               ohshite(_("unable to flush %s after padding"),
                        importanttmpfile);
        if (fseek(importanttmp, 0, SEEK_SET))
-               ohshite(_("unable to seek to start of %.250s after padding"),
+               ohshite(_("unable to seek to start of %s after padding"),
                        importanttmpfile);
 
        onerr_abort--;
@@ -421,7 +421,7 @@ modstatdb_checkpoint(void)
                                  IMPORTANTMAXLEN);
 
                if (unlink(updatefn.buf))
-                       ohshite(_("failed to remove my own update file %.255s"),
+                       ohshite(_("failed to remove my own update file %s"),
                                updatefn.buf);
        }
 
@@ -467,24 +467,24 @@ modstatdb_note_core(struct pkginfo *pkg)
        varbuf_stanza(&uvb, pkg, &pkg->installed);
 
        if (fwrite(uvb.buf, 1, uvb.used, importanttmp) != uvb.used)
-               ohshite(_("unable to write updated status of '%.250s'"),
+               ohshite(_("unable to write updated status of '%s'"),
                        pkg_name(pkg, pnaw_nonambig));
        if (fflush(importanttmp))
-               ohshite(_("unable to flush updated status of '%.250s'"),
+               ohshite(_("unable to flush updated status of '%s'"),
                        pkg_name(pkg, pnaw_nonambig));
        if (ftruncate(fileno(importanttmp), uvb.used))
-               ohshite(_("unable to truncate for updated status of '%.250s'"),
+               ohshite(_("unable to truncate for updated status of '%s'"),
                        pkg_name(pkg, pnaw_nonambig));
        if (fsync(fileno(importanttmp)))
-               ohshite(_("unable to fsync updated status of '%.250s'"),
+               ohshite(_("unable to fsync updated status of '%s'"),
                        pkg_name(pkg, pnaw_nonambig));
        if (fclose(importanttmp))
-               ohshite(_("unable to close updated status of '%.250s'"),
+               ohshite(_("unable to close updated status of '%s'"),
                        pkg_name(pkg, pnaw_nonambig));
        varbuf_rollback(&updatefn_state);
        varbuf_add_fmt(&updatefn, IMPORTANTFMT, nextupdate);
        if (rename(importanttmpfile, updatefn.buf))
-               ohshite(_("unable to install updated status of '%.250s'"),
+               ohshite(_("unable to install updated status of '%s'"),
                        pkg_name(pkg, pnaw_nonambig));
 
        dir_sync_path(updatesdir);
diff --git a/lib/dpkg/dump.c b/lib/dpkg/dump.c
index efdf68b87..a51d0b1e8 100644
--- a/lib/dpkg/dump.c
+++ b/lib/dpkg/dump.c
@@ -505,7 +505,7 @@ write_stanza(FILE *file, const char *filename,
        varbuf_stanza(&vb, pkg, pkgbin);
 
        if (fputs(varbuf_str(&vb), file) < 0)
-               ohshite(_("failed to write details of '%.50s' to '%.250s'"),
+               ohshite(_("failed to write details of '%s' to '%s'"),
                        pkgbin_name_const(pkg, pkgbin, pnaw_nonambig), 
filename);
 
        varbuf_destroy(&vb);
diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index 4c5b9d10e..b6543f9c3 100644
--- a/lib/dpkg/ehandle.c
+++ b/lib/dpkg/ehandle.c
@@ -96,8 +96,7 @@ static struct {
         * Emergency error message buffer.
         *
         * The size is estimated using the following heuristic:
-        * - 6x255 For inserted strings (%.255s &c in fmt; and %s with limited
-        *         length arg).
+        * - 6x255 For inserted strings (%s from pathnames, pkgnames, fields).
         * - 1x255 For constant text.
         * - 1x255 For strerror().
         * - And the total doubled just in case.
diff --git a/lib/dpkg/fields.c b/lib/dpkg/fields.c
index 7885db6bc..dcaefa71b 100644
--- a/lib/dpkg/fields.c
+++ b/lib/dpkg/fields.c
@@ -77,7 +77,7 @@ parse_nv(struct parsedb_state *ps, enum parse_nv_mode 
parse_mode,
        if (nv == NULL) {
                /* We got no match, skip further string validation. */
                if (parse_mode != PARSE_NV_FALLBACK)
-                       return dpkg_put_error(&ps->err, _("has invalid value 
'%.50s'"), str_start);
+                       return dpkg_put_error(&ps->err, _("has invalid value 
'%s'"), str_start);
 
                str_end = NULL;
                value = -1;
@@ -303,7 +303,7 @@ f_version(struct pkginfo *pkg, struct pkgbin *pkgbin,
           const char *value, const struct fieldinfo *fip)
 {
        if (parse_db_version(ps, &pkgbin->version, value) < 0)
-               parse_problem(ps, _("'%s' field value '%.250s'"),
+               parse_problem(ps, _("'%s' field value '%s'"),
                              fip->name, value);
 }
 
@@ -341,7 +341,7 @@ f_configversion(struct pkginfo *pkg, struct pkgbin *pkgbin,
                return;
 
        if (parse_db_version(ps, &pkg->configversion, value) < 0)
-               parse_problem(ps, _("'%s' field value '%.250s'"),
+               parse_problem(ps, _("'%s' field value '%s'"),
                              fip->name, value);
 }
 
@@ -508,7 +508,7 @@ f_dependency(struct pkginfo *pkg, struct pkgbin *pkgbin,
                        emsg = pkg_name_is_invalid(depname.buf);
                        if (emsg)
                                parse_error(ps,
-                                           _("'%s' field, invalid package name 
'%.255s': %s"),
+                                           _("'%s' field, invalid package name 
'%s': %s"),
                                            fip->name, depname.buf, emsg);
 
                        dop = nfmalloc(sizeof(*dop));
@@ -555,8 +555,8 @@ f_dependency(struct pkginfo *pkg, struct pkgbin *pkgbin,
                                if (dop->arch->type == DPKG_ARCH_INVALID)
                                        emsg = 
dpkg_arch_name_is_invalid(arch.buf);
                                if (emsg)
-                                       parse_error(ps, _("'%s' field, 
reference to '%.255s': "
-                                                         "invalid architecture 
name '%.255s': %s"),
+                                       parse_error(ps, _("'%s' field, 
reference to '%s': "
+                                                         "invalid architecture 
name '%s': %s"),
                                                    fip->name, depname.buf, 
arch.buf, emsg);
                        } else if (fip->integer == dep_conflicts ||
                                   fip->integer == dep_breaks ||
@@ -602,12 +602,12 @@ f_dependency(struct pkginfo *pkg, struct pkgbin *pkgbin,
                                                p++;
                                        } else if (c2 == '<' || c2 == '>') {
                                                parse_error(ps,
-                                                           _("'%s' field, 
reference to '%.255s':\n"
+                                                           _("'%s' field, 
reference to '%s':\n"
                                                              " bad version 
relationship %c%c"),
                                                            fip->name, 
depname.buf, c1, c2);
                                        } else {
                                                parse_warn(ps,
-                                                          _("'%s' field, 
reference to '%.255s':\n"
+                                                          _("'%s' field, 
reference to '%s':\n"
                                                             " '%c' is 
obsolete, use '%c=' or '%c%c' instead"),
                                                                 fip->name, 
depname.buf, c1, c1, c1, c1);
                                                dop->verrel |= DPKG_RELATION_EQ;
@@ -617,7 +617,7 @@ f_dependency(struct pkginfo *pkg, struct pkgbin *pkgbin,
                                        p++;
                                } else {
                                        parse_warn(ps,
-                                                  _("'%s' field, reference to 
'%.255s':\n"
+                                                  _("'%s' field, reference to 
'%s':\n"
                                                     " implicit exact match on 
version number, "
                                                     "suggest using '=' 
instead"),
                                                   fip->name, depname.buf);
@@ -631,7 +631,7 @@ f_dependency(struct pkginfo *pkg, struct pkgbin *pkgbin,
 
                                if (!c_isspace(*p) && !c_isalnum(*p)) {
                                        parse_warn(ps,
-                                                  _("'%s' field, reference to 
'%.255s':\n"
+                                                  _("'%s' field, reference to 
'%s':\n"
                                                     " version value starts 
with non-alphanumeric, "
                                                     "suggest adding a space"),
                                                   fip->name, depname.buf);
@@ -651,17 +651,17 @@ f_dependency(struct pkginfo *pkg, struct pkgbin *pkgbin,
                                        p++;
                                if (*p == '\0')
                                        parse_error(ps,
-                                                   _("'%s' field, reference to 
'%.255s': "
+                                                   _("'%s' field, reference to 
'%s': "
                                                      "version unterminated"), 
fip->name, depname.buf);
                                else if (*p != ')')
                                        parse_error(ps,
-                                                   _("'%s' field, reference to 
'%.255s': "
+                                                   _("'%s' field, reference to 
'%s': "
                                                      "version contains '%c' 
instead of '%c'"),
                                                    fip->name, depname.buf, *p, 
')');
                                varbuf_set_buf(&version, versionstart, 
versionlength);
                                if (parse_db_version(ps, &dop->version, 
version.buf) < 0)
                                        parse_problem(ps,
-                                                     _("'%s' field, reference 
to '%.255s': version '%s'"),
+                                                     _("'%s' field, reference 
to '%s': version '%s'"),
                                                      fip->name, depname.buf, 
version.buf);
 
                                p++;
@@ -675,7 +675,7 @@ f_dependency(struct pkginfo *pkg, struct pkgbin *pkgbin,
                                break;
                        if (*p != '|')
                                parse_error(ps,
-                                           _("'%s' field, syntax error after 
reference to package '%.255s'"),
+                                           _("'%s' field, syntax error after 
reference to package '%s'"),
                                            fip->name, dop->ed->name);
                        if (fip->integer == dep_conflicts ||
                            fip->integer == dep_breaks ||
@@ -760,12 +760,12 @@ f_trigpend(struct pkginfo *pend, struct pkgbin *pkgbin,
                emsg = trig_name_is_invalid(word);
                if (emsg)
                        parse_error(ps,
-                                   _("invalid pending trigger name '%.255s': 
%s"),
+                                   _("invalid pending trigger name '%s': %s"),
                                    word, emsg);
 
                if (!trig_note_pend_core(pend, nfstrsave(word)))
                        parse_error(ps,
-                                   _("duplicate pending trigger '%.255s'"),
+                                   _("duplicate pending trigger '%s'"),
                                    word);
        }
 }
@@ -789,12 +789,12 @@ f_trigaw(struct pkginfo *aw, struct pkgbin *pkgbin,
                pend = pkg_spec_parse_pkg(word, &err);
                if (pend == NULL)
                        parse_error(ps,
-                                   _("invalid package name in awaited trigger 
'%.255s': %s"),
+                                   _("invalid package name in awaited trigger 
'%s': %s"),
                                    word, err.str);
 
                if (!trig_note_aw(pend, aw))
                        parse_error(ps,
-                                   _("duplicate awaited trigger package 
'%.255s'"),
+                                   _("duplicate awaited trigger package '%s'"),
                                    word);
 
                trig_awaited_pend_enqueue(pend);
diff --git a/lib/dpkg/file.c b/lib/dpkg/file.c
index e8806df29..24654ae5b 100644
--- a/lib/dpkg/file.c
+++ b/lib/dpkg/file.c
@@ -170,15 +170,15 @@ file_copy_perms(const char *src, const char *dst)
        if (stat(src, &stab) < 0) {
                if (errno == ENOENT)
                        return;
-               ohshite(_("unable to stat source file '%.250s'"), src);
+               ohshite(_("unable to stat source file '%s'"), src);
        }
 
        if (chown(dst, stab.st_uid, stab.st_gid) < 0)
-               ohshite(_("unable to change ownership of target file '%.250s'"),
+               ohshite(_("unable to change ownership of target file '%s'"),
                        dst);
 
        if (chmod(dst, (stab.st_mode & ~S_IFMT)) < 0)
-               ohshite(_("unable to set mode of target file '%.250s'"), dst);
+               ohshite(_("unable to set mode of target file '%s'"), dst);
 }
 
 static int
diff --git a/lib/dpkg/mustlib.c b/lib/dpkg/mustlib.c
index 36500f996..df458ded0 100644
--- a/lib/dpkg/mustlib.c
+++ b/lib/dpkg/mustlib.c
@@ -151,7 +151,7 @@ setcloexec(int fd, const char *fn)
 
        f = fcntl(fd, F_GETFD);
        if (f < 0)
-               ohshite(_("unable to read filedescriptor flags for %.250s"), 
fn);
+               ohshite(_("unable to read filedescriptor flags for %s"), fn);
        if (fcntl(fd, F_SETFD, (f | FD_CLOEXEC)) < 0)
-               ohshite(_("unable to set close-on-exec flag for %.250s"), fn);
+               ohshite(_("unable to set close-on-exec flag for %s"), fn);
 }
diff --git a/lib/dpkg/options-parsers.c b/lib/dpkg/options-parsers.c
index de5bf69f8..9329baae5 100644
--- a/lib/dpkg/options-parsers.c
+++ b/lib/dpkg/options-parsers.c
@@ -46,7 +46,7 @@ dpkg_options_parse_pkgname(const struct cmdinfo *cmd, const 
char *name)
 
        pkg = pkg_spec_parse_pkg(name, &err);
        if (pkg == NULL)
-               badusage(_("--%s needs a valid package name but '%.250s' is 
not: %s"),
+               badusage(_("--%s needs a valid package name but '%s' is not: 
%s"),
                         cmd->olong, name, err.str);
 
        return pkg;
diff --git a/lib/dpkg/options.c b/lib/dpkg/options.c
index cd9251364..4f373dee0 100644
--- a/lib/dpkg/options.c
+++ b/lib/dpkg/options.c
@@ -76,7 +76,7 @@ dpkg_options_load_file(const char *fn, const struct cmdinfo 
*cmdinfos)
        if (!file) {
                if (errno == ENOENT)
                        return;
-               warning(_("failed to open configuration file '%.255s' for 
reading: %s"),
+               warning(_("failed to open configuration file '%s' for reading: 
%s"),
                        fn, strerror(errno));
                return;
        }
@@ -154,9 +154,9 @@ dpkg_options_load_file(const char *fn, const struct cmdinfo 
*cmdinfos)
                }
        }
        if (ferror(file))
-               ohshite(_("read error in configuration file '%.255s'"), fn);
+               ohshite(_("read error in configuration file '%s'"), fn);
        if (fclose(file))
-               ohshite(_("error closing configuration file '%.255s'"), fn);
+               ohshite(_("error closing configuration file '%s'"), fn);
 }
 
 static int
@@ -343,10 +343,10 @@ dpkg_options_parse_arg_int(const struct cmdinfo *cmd, 
const char *str)
        value = strtol(str, &end, 0);
        if (str == end || *end || value < 0 || value > INT_MAX || errno != 0) {
                if (cmd->olong)
-                       badusage(_("invalid integer for --%s: '%.250s'"),
+                       badusage(_("invalid integer for --%s: '%s'"),
                                 cmd->olong, str);
                else
-                       badusage(_("invalid integer for -%c: '%.250s'"),
+                       badusage(_("invalid integer for -%c: '%s'"),
                                 cmd->oshort, str);
        }
 
diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index a756b69ce..77f4f9e3a 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -567,7 +567,7 @@ parsedb_open(const char *filename, enum parsedbflags flags)
 
        fd = open(filename, O_RDONLY);
        if (fd < 0 && !(errno == ENOENT && (flags & pdb_allow_empty)))
-               ohshite(_("failed to open package control file '%.255s' for 
reading"),
+               ohshite(_("failed to open package control file '%s' for 
reading"),
                        filename);
 
        ps = parsedb_new(filename, fd, flags | pdb_close_fd);
@@ -589,7 +589,7 @@ parsedb_load(struct parsedb_state *ps)
                return;
 
        if (fstat(ps->fd, &st) < 0)
-               ohshite(_("can't stat package control file '%.255s'"),
+               ohshite(_("can't stat package control file '%s'"),
                        ps->filename);
 
        if (S_ISFIFO(st.st_mode)) {
@@ -609,13 +609,13 @@ parsedb_load(struct parsedb_state *ps)
                ps->dataptr = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED,
                                   ps->fd, 0);
                if (ps->dataptr == MAP_FAILED)
-                       ohshite(_("can't mmap package control file '%.255s'"),
+                       ohshite(_("can't mmap package control file '%s'"),
                                ps->filename);
 #else
                ps->dataptr = m_malloc(st.st_size);
 
                if (fd_read(ps->fd, ps->dataptr, st.st_size) < 0)
-                       ohshite(_("reading package control file '%.255s'"),
+                       ohshite(_("reading package control file '%s'"),
                                ps->filename);
 #endif
                ps->endptr = ps->dataptr + st.st_size;
@@ -761,7 +761,7 @@ parsedb_close(struct parsedb_state *ps)
                pop_cleanup(ehflag_normaltidy);
 
                if (ps->fd >= 0 && close(ps->fd) < 0)
-                       ohshite(_("failed to close after read: '%.255s'"),
+                       ohshite(_("failed to close after read: '%s'"),
                                ps->filename);
        }
 
@@ -851,7 +851,7 @@ parsedb_parse(struct parsedb_state *ps, struct pkginfo 
**donep)
 
        varbuf_destroy(&fs.value);
        if (donep && !pdone)
-               ohshit(_("no package information in '%.255s'"), ps->filename);
+               ohshit(_("no package information in '%s'"), ps->filename);
 
        return pdone;
 }
diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
index acb0b4e0e..307b7705a 100644
--- a/lib/dpkg/parsehelp.c
+++ b/lib/dpkg/parsehelp.c
@@ -46,7 +46,7 @@ parse_error_msg(struct parsedb_state *ps, const char *fmt, 
va_list args)
                               ps->filename, ps->lno,
                               pkgbin_name(ps->pkg, ps->pkgbin, pnaw_nonambig));
        else
-               varbuf_set_fmt(vb, _("parsing file '%.255s' near line %d:\n "),
+               varbuf_set_fmt(vb, _("parsing file '%s' near line %d:\n "),
                               ps->filename, ps->lno);
 
        varbuf_add_vfmt(vb, fmt, args);
diff --git a/lib/dpkg/path-remove.c b/lib/dpkg/path-remove.c
index 892723949..de595cd9e 100644
--- a/lib/dpkg/path-remove.c
+++ b/lib/dpkg/path-remove.c
@@ -150,7 +150,7 @@ path_remove_tree(const char *pathname)
                errno = EROFS;
        }
        if (errno != ENOTEMPTY && errno != EEXIST) /* Huh? */
-               ohshite(_("unable to securely remove '%.255s'"), pathname);
+               ohshite(_("unable to securely remove '%s'"), pathname);
 
        pid = subproc_fork();
        if (pid == 0) {
diff --git a/lib/dpkg/subproc.c b/lib/dpkg/subproc.c
index 853261db6..e60b9a3f2 100644
--- a/lib/dpkg/subproc.c
+++ b/lib/dpkg/subproc.c
@@ -57,7 +57,7 @@ subproc_set_signal(int sig, struct sigaction *sa, struct 
sigaction *sa_old,
                    const char *name)
 {
        if (sigaction(sig, sa, sa_old))
-               ohshite(_("unable to ignore signal %s before running %.250s"),
+               ohshite(_("unable to ignore signal %s before running %s"),
                        strsignal(sig), name);
 }
 
diff --git a/lib/dpkg/trigdeferred.c b/lib/dpkg/trigdeferred.c
index 2d91e1497..9bf11ebe6 100644
--- a/lib/dpkg/trigdeferred.c
+++ b/lib/dpkg/trigdeferred.c
@@ -82,7 +82,7 @@ trigdef_update_start(enum trigdef_update_flags uf)
                        if (lock_fd < 0) {
                                if (!(errno == ENOENT && (uf & 
TDUF_NO_LOCK_OK)))
                                        ohshite(_("unable to open/create "
-                                                 "triggers lock file 
'%.250s'"),
+                                                 "triggers lock file '%s'"),
                                                fn.buf);
                                return TDUS_ERROR_NO_DIR;
                        }
@@ -99,7 +99,7 @@ trigdef_update_start(enum trigdef_update_flags uf)
        old_deferred = fopen(fn.buf, "r");
        if (!old_deferred) {
                if (errno != ENOENT)
-                       ohshite(_("unable to open triggers deferred file 
'%.250s'"),
+                       ohshite(_("unable to open triggers deferred file '%s'"),
                                fn.buf);
                if (!(uf & TDUF_WRITE_IF_ENOENT)) {
                        if (uf & TDUF_WRITE)
@@ -114,7 +114,7 @@ trigdef_update_start(enum trigdef_update_flags uf)
 
                rc = fstat(fileno(old_deferred), &stab);
                if (rc < 0)
-                       ohshite(_("unable to stat triggers deferred file 
'%.250s'"),
+                       ohshite(_("unable to stat triggers deferred file '%s'"),
                                fn.buf);
 
                if (stab.st_size == 0 && !(uf & TDUF_WRITE_IF_EMPTY)) {
@@ -130,7 +130,7 @@ trigdef_update_start(enum trigdef_update_flags uf)
                        fclose(trig_new_deferred);
                trig_new_deferred = fopen(newfn.buf, "w");
                if (!trig_new_deferred)
-                       ohshite(_("unable to open/create new triggers deferred 
file '%.250s'"),
+                       ohshite(_("unable to open/create new triggers deferred 
file '%s'"),
                                newfn.buf);
 
                setcloexec(fileno(trig_new_deferred), newfn.buf);
@@ -164,7 +164,7 @@ trigdef_update_printf(const char *format, ...)
 static void
 trigdef_parse_error(int line_num, const char *line, const char *ptr)
 {
-       ohshit(_("syntax error in triggers deferred file '%.250s' at "
+       ohshit(_("syntax error in triggers deferred file '%s' at "
                 "line %d character %zd '%s'"),
               fn.buf, line_num, ptr - line + 1, ptr);
 }
@@ -237,8 +237,8 @@ trigdef_parse(void)
                        *ptr++ = '\0';
 
                        if (ptr_ini[0] == '-' && ptr_ini[1])
-                               ohshit(_("invalid package name '%.250s' in "
-                                        "triggers deferred file '%.250s'"),
+                               ohshit(_("invalid package name '%s' in "
+                                        "triggers deferred file '%s'"),
                                       ptr_ini, fn.buf);
 
                        /* Set the package name. */
@@ -256,7 +256,7 @@ trigdef_process_done(void)
 {
        if (old_deferred) {
                if (ferror(old_deferred))
-                       ohshite(_("error reading triggers deferred file 
'%.250s'"),
+                       ohshite(_("error reading triggers deferred file '%s'"),
                                fn.buf);
                fclose(old_deferred);
                old_deferred = NULL;
@@ -267,16 +267,16 @@ trigdef_process_done(void)
 
                if (ferror(trig_new_deferred))
                        ohshite(_("unable to write new triggers deferred "
-                                 "file '%.250s'"), newfn.buf);
+                                 "file '%s'"), newfn.buf);
                rc = fclose(trig_new_deferred);
                trig_new_deferred = NULL;
                if (rc)
                        ohshite(_("unable to close new triggers deferred "
-                                 "file '%.250s'"), newfn.buf);
+                                 "file '%s'"), newfn.buf);
 
                if (rename(newfn.buf, fn.buf))
                        ohshite(_("unable to install new triggers deferred "
-                                 "file '%.250s'"), fn.buf);
+                                 "file '%s'"), fn.buf);
 
                dir_sync_path(triggersdir);
        }
diff --git a/lib/dpkg/triglib.c b/lib/dpkg/triglib.c
index 4be5046bf..7f3f6b59d 100644
--- a/lib/dpkg/triglib.c
+++ b/lib/dpkg/triglib.c
@@ -260,8 +260,8 @@ trk_unknown_interest_change(const char *trig, struct 
pkginfo *pkg,
                             struct pkgbin *pkgbin, int signum,
                             enum trig_options opts)
 {
-       ohshit(_("invalid or unknown syntax in trigger name '%.250s'"
-                " (in trigger interests for package '%.250s')"),
+       ohshit(_("invalid or unknown syntax in trigger name '%s'"
+                " (in trigger interests for package '%s')"),
               trig, pkgbin_name(pkg, pkgbin, pnaw_nonambig));
 }
 
@@ -299,7 +299,7 @@ trk_explicit_start(const char *trig)
        trk_explicit_f = fopen(trk_explicit_fn.buf, "r");
        if (!trk_explicit_f) {
                if (errno != ENOENT)
-                       ohshite(_("failed to open trigger interest list file 
'%.250s'"),
+                       ohshite(_("failed to open trigger interest list file 
'%s'"),
                                trk_explicit_fn.buf);
        }
 }
@@ -326,7 +326,7 @@ trk_explicit_activate_awaiter(struct pkginfo *aw)
                return;
 
        if (fseek(trk_explicit_f, 0, SEEK_SET))
-               ohshite(_("failed to rewind trigger interest file '%.250s'"),
+               ohshite(_("failed to rewind trigger interest file '%s'"),
                        trk_explicit_fn.buf);
 
        while (trk_explicit_fgets(buf, sizeof(buf)) >= 0) {
@@ -338,8 +338,8 @@ trk_explicit_activate_awaiter(struct pkginfo *aw)
 
                pend = pkg_spec_parse_pkg(buf, &err);
                if (pend == NULL)
-                       ohshit(_("trigger interest file '%.250s' syntax error; "
-                                "invalid package name '%.250s': %.250s"),
+                       ohshit(_("trigger interest file '%s' syntax error; "
+                                "invalid package name '%s': %s"),
                               trk_explicit_fn.buf, buf, err.str);
 
                trig_record_activation(pend, opts == TRIG_NOAWAIT ? NULL : aw,
@@ -369,8 +369,8 @@ trk_explicit_interest_change(const char *trig,  struct 
pkginfo *pkg,
 
                pkg_parsed = pkg_spec_parse_pkg(buf, &err);
                if (pkg_parsed == NULL)
-                       ohshit(_("trigger interest file '%.250s' syntax error; "
-                                "invalid package name '%.250s': %.250s"),
+                       ohshit(_("trigger interest file '%s' syntax error; "
+                                "invalid package name '%s': %s"),
                               trk_explicit_fn.buf, buf, err.str);
 
                if (pkg == pkg_parsed &&
@@ -471,8 +471,8 @@ trk_file_interest_change(const char *trig, struct pkginfo 
*pkg,
 found:
        tfi->options = opts;
        if (signum > 1)
-               ohshit(_("duplicate file trigger interest for filename '%.250s' 
"
-                        "and package '%.250s'"), trig,
+               ohshit(_("duplicate file trigger interest for filename '%s' "
+                        "and package '%s'"), trig,
                       pkgbin_name(pkg, pkgbin, pnaw_nonambig));
        if (signum > 0)
                return;
@@ -488,7 +488,7 @@ static void
 trig_file_interests_remove(void)
 {
        if (unlink(triggersfilefile) && errno != ENOENT)
-               ohshite(_("cannot remove '%.250s'"), triggersfilefile);
+               ohshite(_("cannot remove '%s'"), triggersfilefile);
 }
 
 static void
@@ -542,7 +542,7 @@ trig_file_interests_ensure(void)
        if (!f) {
                if (errno == ENOENT)
                        goto ok;
-               ohshite(_("unable to read file triggers file '%.250s'"),
+               ohshite(_("unable to read file triggers file '%s'"),
                        triggersfilefile);
        }
 
@@ -553,7 +553,7 @@ trig_file_interests_ensure(void)
 
                space = strchr(linebuf, ' ');
                if (!space || linebuf[0] != '/')
-                       ohshit(_("syntax error in file triggers file '%.250s'"),
+                       ohshit(_("syntax error in file triggers file '%s'"),
                               triggersfilefile);
                *space++ = '\0';
 
@@ -562,8 +562,8 @@ trig_file_interests_ensure(void)
                pkg = pkg_spec_parse_pkg(space, &err);
                if (pkg == NULL)
                        ohshit(_("file triggers record mentions invalid "
-                                "package name '%.250s' (for interest in file "
-                                "'%.250s'): %.250s"), space, linebuf, err.str);
+                                "package name '%s' (for interest in file "
+                                "'%s'): %s"), space, linebuf, err.str);
                pkgbin = &pkg->installed;
 
                trk_file_interest_change(linebuf, pkg, pkgbin, +2, trig_opts);
@@ -726,7 +726,7 @@ trig_parse_ci(const char *file, trig_parse_cicb *interest,
                if (errno == ENOENT)
                        /* No file is just like an empty one. */
                        return;
-               ohshite(_("unable to open triggers package metadata file 
'%.250s'"),
+               ohshite(_("unable to open triggers package metadata file '%s'"),
                        file);
        }
        push_cleanup(cu_closestream, ~0, 1, f);
@@ -834,7 +834,7 @@ trig_incorporate(enum modstatdb_rw cstatus)
                if (mkdir(triggersdir, 0755)) {
                        if (errno != EEXIST)
                                ohshite(_("unable to create triggers state"
-                                         " directory '%.250s'"), triggersdir);
+                                         " directory '%s'"), triggersdir);
                }
                ur = trigdef_update_start(tduf);
        }
diff --git a/lib/dpkg/utils.c b/lib/dpkg/utils.c
index 363624c4c..3abb1afdc 100644
--- a/lib/dpkg/utils.c
+++ b/lib/dpkg/utils.c
@@ -33,14 +33,14 @@ fgets_checked(char *buf, size_t bufsz, FILE *f, const char 
*fn)
 
        if (!fgets(buf, bufsz, f)) {
                if (ferror(f))
-                       ohshite(_("read error in '%.250s'"), fn);
+                       ohshite(_("read error in '%s'"), fn);
                return -1;
        }
        l = strlen(buf);
        if (l == 0)
-               ohshit(_("fgets gave an empty string from '%.250s'"), fn);
+               ohshit(_("fgets gave an empty string from '%s'"), fn);
        if (buf[--l] != '\n')
-               ohshit(_("too-long line or missing newline in '%.250s'"), fn);
+               ohshit(_("too-long line or missing newline in '%s'"), fn);
        buf[l] = '\0';
 
        return l;
@@ -52,7 +52,7 @@ fgets_must(char *buf, size_t bufsz, FILE *f, const char *fn)
        int l = fgets_checked(buf, bufsz, f, fn);
 
        if (l < 0)
-               ohshit(_("unexpected end of file reading '%.250s'"), fn);
+               ohshit(_("unexpected end of file reading '%s'"), fn);
 
        return l;
 }
diff --git a/src/deb/build.c b/src/deb/build.c
index f883cafc7..f8462735b 100644
--- a/src/deb/build.c
+++ b/src/deb/build.c
@@ -231,15 +231,15 @@ check_ctrl_perms(const char *ctrldir)
                        if (S_ISLNK(mscriptstab.st_mode))
                                continue;
                        if (!S_ISREG(mscriptstab.st_mode))
-                               ohshit(_("maintainer script '%.50s' is not a 
plain file or symlink"),
+                               ohshit(_("maintainer script '%s' is not a plain 
file or symlink"),
                                       *mscriptp);
                        if ((mscriptstab.st_mode & 07557) != 0555)
-                               ohshit(_("maintainer script '%.50s' has bad 
permissions %03lo "
+                               ohshit(_("maintainer script '%s' has bad 
permissions %03lo "
                                         "(must be >=0555 and <=0775)"),
                                       *mscriptp,
                                       (unsigned long)(mscriptstab.st_mode & 
07777));
                } else if (errno != ENOENT) {
-                       ohshite(_("maintainer script '%.50s' is not stattable"),
+                       ohshite(_("maintainer script '%s' is not stattable"),
                                *mscriptp);
                }
        }
@@ -339,10 +339,10 @@ check_conffiles(const char *ctrldir, const char *rootdir)
                                        warning(_("conffile filename '%s' 
contains trailing white spaces"),
                                                conffilename);
                                if (!remove_on_upgrade)
-                                       ohshit(_("conffile '%.250s' does not 
appear in package"),
+                                       ohshit(_("conffile '%s' does not appear 
in package"),
                                               conffilename);
                        } else {
-                               ohshite(_("conffile '%.250s' is not stattable"),
+                               ohshite(_("conffile '%s' is not stattable"),
                                        conffilename);
                        }
                } else if (remove_on_upgrade) {
@@ -474,7 +474,7 @@ gen_dest_pathname(const char *dir, const char *dest)
 
                if (stat(dest, &dest_stab)) {
                        if (errno != ENOENT)
-                               ohshite(_("unable to check for existence of 
archive '%.250s'"),
+                               ohshite(_("unable to check for existence of 
archive '%s'"),
                                        dest);
                } else if (S_ISDIR(dest_stab.st_mode)) {
                        /* Need to compute the destination name from the package
@@ -544,7 +544,7 @@ tarball_pack(const char *dir, filenames_feed_func 
*tar_filenames_feeder,
                close(pipe_tarball[1]);
 
                if (chdir(dir))
-                       ohshite(_("failed to chdir to '%.255s'"), dir);
+                       ohshite(_("failed to chdir to '%s'"), dir);
 
                snprintf(mtime, sizeof(mtime), "@%jd", options->timestamp);
 
@@ -604,9 +604,9 @@ parse_timestamp(const char *value)
        errno = 0;
        timestamp = strtoimax(value, &end, 10);
        if (value == end || *end)
-               ohshit(_("unable to parse timestamp '%.255s'"), value);
+               ohshit(_("unable to parse timestamp '%s'"), value);
        else if (errno != 0)
-               ohshite(_("unable to parse timestamp '%.255s'"), value);
+               ohshite(_("unable to parse timestamp '%s'"), value);
 
        return timestamp;
 }
diff --git a/src/deb/extract.c b/src/deb/extract.c
index e33da5659..777e5dcc9 100644
--- a/src/deb/extract.c
+++ b/src/deb/extract.c
@@ -70,10 +70,10 @@ static void DPKG_ATTR_NORET
 read_fail(int rc, const char *filename, const char *what)
 {
        if (rc >= 0)
-               ohshit(_("unexpected end of file in %s in %.255s"),
+               ohshit(_("unexpected end of file in %s in %s"),
                       what, filename);
        else
-               ohshite(_("error reading %s from file %.255s"), what, filename);
+               ohshite(_("error reading %s from file %s"), what, filename);
 }
 
 static ssize_t
@@ -147,7 +147,7 @@ extracthalf(const char *debar, const char *dir,
                                read_fail(rc, debar, _("archive member 
header"));
 
                        if (dpkg_ar_member_is_invalid(&arh))
-                               ohshit(_("file '%.250s' is corrupt - bad 
archive header magic"),
+                               ohshit(_("file '%s' is corrupt - bad archive 
header magic"),
                                       debar);
 
                        dpkg_ar_normalize_name(&arh);
@@ -157,7 +157,7 @@ extracthalf(const char *debar, const char *dir,
                                char *infobuf;
 
                                if (strncmp(arh.ar_name, DEBMAGIC, 
sizeof(arh.ar_name)) != 0)
-                                       ohshit(_("file '%.250s' is not a Debian 
binary archive (try dpkg-split?)"),
+                                       ohshit(_("file '%s' is not a Debian 
binary archive (try dpkg-split?)"),
                                               debar);
                                infobuf = m_malloc(memberlen + 1);
                                rc = fd_read(ar->fd, infobuf,
@@ -200,7 +200,7 @@ extracthalf(const char *debar, const char *dir,
                                                       debar, 
(int)sizeof(arh.ar_name), arh.ar_name);
 
                                        if (ctrllennum != 0)
-                                               ohshit(_("archive '%.250s' 
contains two control members, giving up"),
+                                               ohshit(_("archive '%s' contains 
two control members, giving up"),
                                                       debar);
                                        ctrllennum = memberlen;
                                } else {
@@ -286,7 +286,7 @@ extracthalf(const char *debar, const char *dir,
                                 " corrupted by being downloaded in ASCII 
mode"));
                }
 
-               ohshit(_("'%.255s' is not a Debian format archive"), debar);
+               ohshit(_("'%s' is not a Debian format archive"), debar);
        }
 
        m_pipe(p1);
diff --git a/src/deb/info.c b/src/deb/info.c
index 7926c43e6..150a67ee3 100644
--- a/src/deb/info.c
+++ b/src/deb/info.c
@@ -60,7 +60,7 @@ cu_info_treewalk_fixup_dir(struct treenode *node)
 
        nodename = treenode_get_pathname(node);
        if (chmod(nodename, 0755) < 0)
-               ohshite(_("error setting permissions of '%.255s'"), nodename);
+               ohshite(_("error setting permissions of '%s'"), nodename);
 
        return 0;
 }
@@ -127,11 +127,11 @@ info_spew(const char *debar, const char *dir, const char 
*const *argv)
                                       err.str);
                        close(fd);
                } else if (errno == ENOENT) {
-                       notice(_("'%.255s' contains no control component 
'%.255s'"),
+                       notice(_("'%s' contains no control component '%s'"),
                               debar, component);
                        re++;
                } else {
-                       ohshite(_("cannot open file '%.255s'"),
+                       ohshite(_("cannot open file '%s'"),
                                controlfile.buf);
                }
        }
@@ -193,7 +193,7 @@ info_list(const char *debar, const char *dir)
 
        cdn = scandir(dir, &cdlist, &ilist_select, alphasort);
        if (cdn < 0)
-               ohshite(_("cannot scan directory '%.255s'"), dir);
+               ohshite(_("cannot scan directory '%s'"), dir);
 
        for (n = 0; n < cdn; n++) {
                struct dirent *cdep;
@@ -204,7 +204,7 @@ info_list(const char *debar, const char *dir)
                varbuf_set_fmt(&controlfile, "%s/%s", dir, cdep->d_name);
 
                if (stat(controlfile.buf, &stab))
-                       ohshite(_("cannot get file '%.255s' metadata"),
+                       ohshite(_("cannot get file '%s' metadata"),
                                controlfile.buf);
                if (S_ISREG(stab.st_mode)) {
                        int exec_mark = (S_IXUSR & stab.st_mode) ? '*' : ' ';
@@ -212,13 +212,13 @@ info_list(const char *debar, const char *dir)
 
                        cc = fopen(controlfile.buf, "r");
                        if (!cc)
-                               ohshite(_("cannot open file '%.255s'"),
+                               ohshite(_("cannot open file '%s'"),
                                        controlfile.buf);
 
                        info_script(cc, &script);
 
                        if (ferror(cc))
-                               ohshite(_("cannot read file '%.255s'"),
+                               ohshite(_("cannot read file '%s'"),
                                        controlfile.buf);
                        fclose(cc);
 
@@ -232,7 +232,7 @@ info_list(const char *debar, const char *dir)
                                       (intmax_t)stab.st_size, script.lines,
                                       exec_mark, cdep->d_name);
                } else {
-                       printf(_("     not a plain file          %.255s\n"),
+                       printf(_("     not a plain file          %s\n"),
                               cdep->d_name);
                }
                free(cdep);
@@ -243,7 +243,7 @@ info_list(const char *debar, const char *dir)
        cc = fopen(controlfile.buf, "r");
        if (!cc) {
                if (errno != ENOENT)
-                       ohshite(_("cannot read file '%.255s'"),
+                       ohshite(_("cannot read file '%s'"),
                                controlfile.buf);
                warning(_("no 'control' file in control archive!"));
        } else {
@@ -260,7 +260,7 @@ info_list(const char *debar, const char *dir)
                        putc('\n', stdout);
 
                if (ferror(cc))
-                       ohshite(_("cannot read file '%.255s'"),
+                       ohshite(_("cannot read file '%s'"),
                                controlfile.buf);
                fclose(cc);
        }
diff --git a/src/main/archives.c b/src/main/archives.c
index b412fe5c0..b5c6f0356 100644
--- a/src/main/archives.c
+++ b/src/main/archives.c
@@ -307,7 +307,7 @@ tarobject_skip_padding(struct tarcontext *tc, struct 
tar_entry *te)
                return;
 
        if (fd_skip(tc->backendpipe, TARBLKSZ - remainder, &err) < 0)
-               ohshit(_("cannot skip padding for file '%.255s': %s"),
+               ohshit(_("cannot skip padding for file '%s': %s"),
                       te->name, err.str);
 }
 
@@ -320,7 +320,7 @@ tarobject_skip_entry(struct tarcontext *tc, struct 
tar_entry *ti)
                struct dpkg_error err;
 
                if (fd_skip(tc->backendpipe, ti->size, &err) < 0)
-                       ohshit(_("cannot skip file '%.255s' (replaced or 
excluded?) from pipe: %s"),
+                       ohshit(_("cannot skip file '%s' (replaced or excluded?) 
from pipe: %s"),
                               ti->name, err.str);
                tarobject_skip_padding(tc, ti);
        }
@@ -389,7 +389,7 @@ tarobject_extract(struct tarcontext *tc, struct tar_entry 
*te,
                 * might be a statoverride. */
                fd = open(path, O_CREAT | O_EXCL | O_WRONLY, 0);
                if (fd < 0)
-                       ohshite(_("unable to create '%.255s' (while processing 
'%.255s')"),
+                       ohshite(_("unable to create '%s' (while processing 
'%s')"),
                                path, te->name);
                push_cleanup(cu_closefd, ehflag_bombout, 1, &fd);
                debug(dbg_eachfiledetail, "tarobject file open, size=%jd",
@@ -402,7 +402,7 @@ tarobject_extract(struct tarcontext *tc, struct tar_entry 
*te,
 
                newhash = nfmalloc(MD5HASHLEN + 1);
                if (fd_fd_copy_and_md5(tc->backendpipe, fd, newhash, te->size, 
&err) < 0)
-                       ohshit(_("cannot copy extracted data for '%.255s' to 
'%.255s': %s"),
+                       ohshit(_("cannot copy extracted data for '%s' to '%s': 
%s"),
                               te->name, fnamenewvb.buf, err.str);
                namenode->newhash = newhash;
                debug(dbg_eachfiledetail,
@@ -420,11 +420,11 @@ tarobject_extract(struct tarcontext *tc, struct tar_entry 
*te,
                              namenode->statoverride->mode);
                rc = fchown(fd, st->uid, st->gid);
                if (forcible_nonroot_error(rc))
-                       ohshite(_("error setting ownership of '%.255s'"),
+                       ohshite(_("error setting ownership of '%s'"),
                                te->name);
                rc = fchmod(fd, st->mode & ~S_IFMT);
                if (forcible_nonroot_error(rc))
-                       ohshite(_("error setting permissions of '%.255s'"),
+                       ohshite(_("error setting permissions of '%s'"),
                                te->name);
 
                /* Postpone the fsync, to try to avoid massive I/O
@@ -434,22 +434,22 @@ tarobject_extract(struct tarcontext *tc, struct tar_entry 
*te,
 
                pop_cleanup(ehflag_normaltidy); /* fd = open(path) */
                if (close(fd))
-                       ohshite(_("error closing/writing '%.255s'"), te->name);
+                       ohshite(_("error closing/writing '%s'"), te->name);
                debug(dbg_eachfiledetail, "tarobject file created");
                break;
        case TAR_FILETYPE_FIFO:
                if (mkfifo(path, 0))
-                       ohshite(_("error creating pipe '%.255s'"), te->name);
+                       ohshite(_("error creating pipe '%s'"), te->name);
                debug(dbg_eachfiledetail, "tarobject fifo created");
                break;
        case TAR_FILETYPE_CHARDEV:
                if (mknod(path, S_IFCHR, te->dev))
-                       ohshite(_("error creating device '%.255s'"), te->name);
+                       ohshite(_("error creating device '%s'"), te->name);
                debug(dbg_eachfiledetail, "tarobject chardev created");
                break;
        case TAR_FILETYPE_BLOCKDEV:
                if (mknod(path, S_IFBLK, te->dev))
-                       ohshite(_("error creating device '%.255s'"), te->name);
+                       ohshite(_("error creating device '%s'"), te->name);
                debug(dbg_eachfiledetail, "tarobject blockdev created");
                break;
        case TAR_FILETYPE_HARDLINK:
@@ -460,7 +460,7 @@ tarobject_extract(struct tarcontext *tc, struct tar_entry 
*te,
                if (linknode->flags & (FNNF_DEFERRED_RENAME | FNNF_NEW_CONFF))
                        varbuf_add_str(&hardlinkfn, DPKGNEWEXT);
                if (link(hardlinkfn.buf, path))
-                       ohshite(_("error creating hard link '%.255s'"),
+                       ohshite(_("error creating hard link '%s'"),
                                te->name);
                namenode->newhash = linknode->newhash;
                debug(dbg_eachfiledetail,
@@ -470,14 +470,14 @@ tarobject_extract(struct tarcontext *tc, struct tar_entry 
*te,
        case TAR_FILETYPE_SYMLINK:
                /* We've already checked for an existing directory. */
                if (symlink(te->linkname, path))
-                       ohshite(_("error creating symbolic link '%.255s'"),
+                       ohshite(_("error creating symbolic link '%s'"),
                                te->name);
                debug(dbg_eachfiledetail, "tarobject symlink created");
                break;
        case TAR_FILETYPE_DIR:
                /* We've already checked for an existing directory. */
                if (mkdir(path, 0))
-                       ohshite(_("error creating directory '%.255s'"),
+                       ohshite(_("error creating directory '%s'"),
                                te->name);
                debug(dbg_eachfiledetail, "tarobject directory created");
                break;
@@ -497,7 +497,7 @@ tarobject_hash(struct tarcontext *tc, struct tar_entry *te,
 
                newhash = nfmalloc(MD5HASHLEN + 1);
                if (fd_md5(tc->backendpipe, newhash, te->size, &err) < 0)
-                       ohshit(_("cannot compute MD5 digest for file '%.255s' 
in tar archive: %s"),
+                       ohshit(_("cannot compute MD5 digest for file '%s' in 
tar archive: %s"),
                               te->name, err.str);
                tarobject_skip_padding(tc, te);
 
@@ -527,12 +527,12 @@ tarobject_set_mtime(struct tar_entry *te, const char 
*path)
        if (te->type == TAR_FILETYPE_SYMLINK) {
 #ifdef HAVE_LUTIMES
                if (lutimes(path, tv) && errno != ENOSYS)
-                       ohshite(_("error setting timestamps of '%.255s'"),
+                       ohshite(_("error setting timestamps of '%s'"),
                                path);
 #endif
        } else {
                if (utimes(path, tv))
-                       ohshite(_("error setting timestamps of '%.255s'"),
+                       ohshite(_("error setting timestamps of '%s'"),
                                path);
        }
 }
@@ -549,15 +549,15 @@ tarobject_set_perms(struct tar_entry *te, const char 
*path, struct file_stat *st
        if (te->type == TAR_FILETYPE_SYMLINK) {
                rc = lchown(path, st->uid, st->gid);
                if (forcible_nonroot_error(rc))
-                       ohshite(_("error setting ownership of symlink 
'%.255s'"),
+                       ohshite(_("error setting ownership of symlink '%s'"),
                                path);
        } else {
                rc = chown(path, st->uid, st->gid);
                if (forcible_nonroot_error(rc))
-                       ohshite(_("error setting ownership of '%.255s'"), path);
+                       ohshite(_("error setting ownership of '%s'"), path);
                rc = chmod(path, st->mode & ~S_IFMT);
                if (forcible_nonroot_error(rc))
-                       ohshite(_("error setting permissions of '%.255s'"),
+                       ohshite(_("error setting permissions of '%s'"),
                                path);
        }
 }
@@ -592,12 +592,12 @@ tarobject_matches(struct tarcontext *tc,
                        break;
                linksize = file_readlink(fn_old, &linkname, stab->st_size);
                if (linksize < 0)
-                       ohshite(_("unable to read link '%.255s'"), fn_old);
+                       ohshite(_("unable to read link '%s'"), fn_old);
                else if (linksize > stab->st_size)
-                       ohshit(_("symbolic link '%.250s' size has changed from 
%jd to %zd"),
+                       ohshit(_("symbolic link '%s' size has changed from %jd 
to %zd"),
                               fn_old, (intmax_t)stab->st_size, linksize);
                else if (linksize < stab->st_size)
-                       warning(_("symbolic link '%.250s' size has changed from 
%jd to %zd"),
+                       warning(_("symbolic link '%s' size has changed from %jd 
to %zd"),
                               fn_old, (intmax_t)stab->st_size, linksize);
                linkmatch = strcmp(linkname.buf, te->linkname) == 0;
                varbuf_destroy(&linkname);
@@ -632,8 +632,8 @@ tarobject_matches(struct tarcontext *tc,
        }
 
        forcibleerr(FORCE_OVERWRITE,
-                   _("trying to overwrite shared '%.250s', which is different "
-                     "from other instances of package %.250s"),
+                   _("trying to overwrite shared '%s', which is different "
+                     "from other instances of package %s"),
                    namenode->name, pkg_name(tc->pkg, pnaw_nonambig));
 }
 
@@ -665,7 +665,7 @@ linktosameexistingdir(const struct tar_entry *ti, const 
char *fname,
        statr = stat(fname, &oldstab);
        if (statr) {
                if (!(errno == ENOENT || errno == ELOOP || errno == ENOTDIR))
-                       ohshite(_("failed to stat (dereference) existing 
symlink '%.250s'"),
+                       ohshite(_("failed to stat (dereference) existing 
symlink '%s'"),
                                fname);
                return false;
        }
@@ -690,7 +690,7 @@ linktosameexistingdir(const struct tar_entry *ti, const 
char *fname,
        if (statr) {
                if (!(errno == ENOENT || errno == ELOOP || errno == ENOTDIR))
                        ohshite(_("failed to stat (dereference) proposed new 
symlink target"
-                                 " '%.250s' for symlink '%.250s'"),
+                                 " '%s' for symlink '%s'"),
                                symlinkfn->buf, fname);
                return false;
        }
@@ -726,7 +726,7 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
 
        /* Perform some sanity checks on the tar entry. */
        if (strchr(ti->name, '\n'))
-               ohshit(_("newline not allowed in archive object name '%.255s'"),
+               ohshit(_("newline not allowed in archive object name '%s'"),
                       ti->name);
 
        namenode = fsys_hash_find_node(ti->name, FHFF_NONE);
@@ -759,15 +759,15 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
 
                if (divpkgset) {
                        forcibleerr(FORCE_OVERWRITE_DIVERTED,
-                                   _("trying to overwrite '%.250s', which is 
the "
-                                     "diverted version of '%.250s' (package: 
%.100s)"),
+                                   _("trying to overwrite '%s', which is the "
+                                     "diverted version of '%s' (package: %s)"),
                                    nifd->namenode->name,
                                    nifd->namenode->divert->camefrom->name,
                                    divpkgset->name);
                } else {
                        forcibleerr(FORCE_OVERWRITE_DIVERTED,
-                                   _("trying to overwrite '%.250s', which is 
the "
-                                     "diverted version of '%.250s'"),
+                                   _("trying to overwrite '%s', which is the "
+                                     "diverted version of '%s'"),
                                    nifd->namenode->name,
                                    nifd->namenode->divert->camefrom->name);
                }
@@ -800,7 +800,7 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
        if (statr) {
                /* The lstat failed. */
                if (errno != ENOENT && errno != ENOTDIR)
-                       ohshite(_("unable to stat '%.255s' (which was about to 
be installed)"),
+                       ohshite(_("unable to stat '%s' (which was about to be 
installed)"),
                                ti->name);
 
                /*
@@ -823,7 +823,7 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
                        }
 
                        if (errno != ENOENT && errno != ENOTDIR)
-                               ohshite(_("unable to clean up mess surrounding 
'%.255s' "
+                               ohshite(_("unable to clean up mess surrounding 
'%s' "
                                          "before installing another version"),
                                        ti->name);
                        debug(dbg_eachfiledetail,
@@ -835,7 +835,7 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
                              ti->name, fnamevb.buf);
                        statr = lstat(fnamevb.buf, &stab);
                        if (statr)
-                               ohshite(_("unable to stat restored '%.255s' "
+                               ohshite(_("unable to stat restored '%s' "
                                          "before installing another version"),
                                        ti->name);
                }
@@ -877,7 +877,7 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
        case TAR_FILETYPE_HARDLINK:
                break;
        default:
-               ohshit(_("archive contained object '%.255s' of unknown type 
0x%x"),
+               ohshit(_("archive contained object '%s' of unknown type 0x%x"),
                       ti->name, ti->type);
        }
 
@@ -1001,16 +1001,16 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
                                /* At this point we are replacing something 
without a Replaces. */
                                if (!statr && S_ISDIR(stab.st_mode)) {
                                        forcibleerr(FORCE_OVERWRITE_DIR,
-                                                   _("trying to overwrite 
directory '%.250s' "
-                                                     "in package %.250s 
(%.250s) with nondirectory"),
+                                                   _("trying to overwrite 
directory '%s' "
+                                                     "in package %s (%s) with 
nondirectory"),
                                                    nifd->namenode->name,
                                                    pkg_name(otherpkg, 
pnaw_nonambig),
                                                    
versiondescribe(&otherpkg->installed.version,
                                                                    
vdew_nonambig));
                                } else {
                                        forcibleerr(FORCE_OVERWRITE,
-                                                   _("trying to overwrite 
'%.250s', "
-                                                     "which is also in package 
%.250s (%.250s)"),
+                                                   _("trying to overwrite 
'%s', "
+                                                     "which is also in package 
%s (%s)"),
                                                    nifd->namenode->name,
                                                    pkg_name(otherpkg, 
pnaw_nonambig),
                                                    
versiondescribe(&otherpkg->installed.version,
@@ -1129,7 +1129,7 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
                              "tarobject directory, nonatomic");
                        nifd->namenode->flags |= FNNF_NO_ATOMIC_OVERWRITE;
                        if (rename(fnamevb.buf, fnametmpvb.buf))
-                               ohshite(_("unable to move aside '%.255s' to 
install new version"),
+                               ohshite(_("unable to move aside '%s' to install 
new version"),
                                        ti->name);
                } else if (S_ISLNK(stab.st_mode)) {
                        ssize_t linksize;
@@ -1140,27 +1140,27 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
                         * of a symlink is the same as linking to it.) */
                        linksize = file_readlink(fnamevb.buf, &symlinkfn, 
stab.st_size);
                        if (linksize < 0)
-                               ohshite(_("unable to read link '%.255s'"),
+                               ohshite(_("unable to read link '%s'"),
                                        ti->name);
                        else if (linksize > stab.st_size)
-                               ohshit(_("symbolic link '%.250s' size has 
changed from %jd to %zd"),
+                               ohshit(_("symbolic link '%s' size has changed 
from %jd to %zd"),
                                       fnamevb.buf, (intmax_t)stab.st_size, 
linksize);
                        else if (linksize < stab.st_size)
-                               warning(_("symbolic link '%.250s' size has 
changed from %jd to %zd"),
+                               warning(_("symbolic link '%s' size has changed 
from %jd to %zd"),
                                       fnamevb.buf, (intmax_t)stab.st_size, 
linksize);
                        if (symlink(symlinkfn.buf, fnametmpvb.buf))
-                               ohshite(_("unable to make backup symlink for 
'%.255s'"),
+                               ohshite(_("unable to make backup symlink for 
'%s'"),
                                        ti->name);
                        rc = lchown(fnametmpvb.buf, stab.st_uid, stab.st_gid);
                        if (forcible_nonroot_error(rc))
-                               ohshite(_("unable to chown backup symlink for 
'%.255s'"),
+                               ohshite(_("unable to chown backup symlink for 
'%s'"),
                                        ti->name);
                        tarobject_set_se_context(fnamevb.buf, fnametmpvb.buf,
                                                 stab.st_mode);
                } else {
                        debug(dbg_eachfiledetail, "tarobject nondirectory, 
'link' backup");
                        if (link(fnamevb.buf, fnametmpvb.buf))
-                               ohshite(_("unable to make backup link of 
'%.255s' before installing new version"),
+                               ohshite(_("unable to make backup link of '%s' 
before installing new version"),
                                        ti->name);
                }
        }
@@ -1179,7 +1179,7 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
                      "tarobject done and installation deferred");
        } else {
                if (rename(fnamenewvb.buf, fnamevb.buf))
-                       ohshite(_("unable to install new version of '%.255s'"),
+                       ohshite(_("unable to install new version of '%s'"),
                                ti->name);
 
                /*
@@ -1217,13 +1217,13 @@ tar_writeback_barrier(struct fsys_namenode_list *files, 
struct pkginfo *pkg)
 
                fd = open(fnamenewvb.buf, O_WRONLY);
                if (fd < 0)
-                       ohshite(_("unable to open '%.255s'"), fnamenewvb.buf);
+                       ohshite(_("unable to open '%s'"), fnamenewvb.buf);
                /* Ignore the return code as it should be considered equivalent
                 * to an asynchronous hint for the kernel, we are doing an
                 * fsync() later on anyway. */
                sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WAIT_BEFORE);
                if (close(fd))
-                       ohshite(_("error closing/writing '%.255s'"),
+                       ohshite(_("error closing/writing '%s'"),
                                fnamenewvb.buf);
        }
 }
@@ -1243,7 +1243,7 @@ tar_deferred_extract(struct fsys_namenode_list *files, 
struct pkginfo *pkg)
        tar_writeback_barrier(files, pkg);
 
        for (cfile = files; cfile; cfile = cfile->next) {
-               debug(dbg_eachfile, "deferred extract of '%.255s'?",
+               debug(dbg_eachfile, "deferred extract of '%s'?",
                      cfile->namenode->name);
 
                if (!(cfile->namenode->flags & FNNF_DEFERRED_RENAME))
@@ -1261,13 +1261,13 @@ tar_deferred_extract(struct fsys_namenode_list *files, 
struct pkginfo *pkg)
 
                        fd = open(fnamenewvb.buf, O_WRONLY);
                        if (fd < 0)
-                               ohshite(_("unable to open '%.255s'"),
+                               ohshite(_("unable to open '%s'"),
                                        fnamenewvb.buf);
                        if (fsync(fd))
-                               ohshite(_("unable to sync file '%.255s'"),
+                               ohshite(_("unable to sync file '%s'"),
                                        fnamenewvb.buf);
                        if (close(fd))
-                               ohshite(_("error closing/writing '%.255s'"),
+                               ohshite(_("error closing/writing '%s'"),
                                        fnamenewvb.buf);
 
                        cfile->namenode->flags &= ~FNNF_DEFERRED_FSYNC;
@@ -1276,7 +1276,7 @@ tar_deferred_extract(struct fsys_namenode_list *files, 
struct pkginfo *pkg)
                debug(dbg_eachfiledetail, "deferred extract needs rename");
 
                if (rename(fnamenewvb.buf, fnamevb.buf))
-                       ohshite(_("unable to install new version of '%.255s'"),
+                       ohshite(_("unable to install new version of '%s'"),
                                cfile->namenode->name);
 
                cfile->namenode->flags &= ~FNNF_DEFERRED_RENAME;
@@ -1474,12 +1474,12 @@ check_breaks(struct dependency *dep, struct pkginfo 
*pkg, const char *pfilename)
        }
 
        if (fixbydeconf && !f_autodeconf) {
-               ohshit(_("installing %.250s would break %.250s, and\n"
+               ohshit(_("installing %s would break %s, and\n"
                         " deconfiguration is not permitted (--auto-deconfigure 
might help)"),
                       pkgbin_name(pkg, &pkg->available, pnaw_nonambig),
                       pkg_name(fixbydeconf, pnaw_nonambig));
        } else {
-               ohshit(_("installing %.250s would break existing software"),
+               ohshit(_("installing %s would break existing software"),
                       pkgbin_name(pkg, &pkg->available, pnaw_nonambig));
        }
 }
@@ -1615,7 +1615,7 @@ check_conflict(struct dependency *dep, struct pkginfo 
*pkg,
               pkgbin_name(pkg, &pkg->available, pnaw_nonambig),
               varbuf_str(&conflictwhy));
        if (!force_conflicts(dep->list))
-               ohshit(_("conflicting packages - not installing %.250s"),
+               ohshit(_("conflicting packages - not installing %s"),
                       pkgbin_name(pkg, &pkg->available, pnaw_nonambig));
        warning(_("ignoring conflict, may proceed anyway!"));
        varbuf_destroy(&conflictwhy);
@@ -1827,7 +1827,7 @@ wanttoinstall(struct pkginfo *pkg)
        } else if (rc == 0) {
                /* Same version fully installed. */
                if (f_skipsame && pkg->available.arch == pkg->installed.arch) {
-                       notice(_("package %.250s (%.250s) with same version 
already installed, skipping"),
+                       notice(_("package %s (%s) with same version already 
installed, skipping"),
                               pkg_name(pkg, pnaw_nonambig),
                               versiondescribe(&pkg->installed.version, 
vdew_nonambig));
                        return false;
@@ -1835,13 +1835,13 @@ wanttoinstall(struct pkginfo *pkg)
                        return true;
                }
        } else if (in_force(FORCE_DOWNGRADE)) {
-               warning(_("downgrading %.250s (%.250s) to (%.250s)"),
+               warning(_("downgrading %s (%s) to (%s)"),
                        pkg_name(pkg, pnaw_nonambig),
                        versiondescribe(&pkg->installed.version, vdew_nonambig),
                        versiondescribe(&pkg->available.version, 
vdew_nonambig));
                return true;
        } else {
-               notice(_("will not downgrade %.250s (%.250s) to (%.250s), 
skipping"),
+               notice(_("will not downgrade %s (%s) to (%s), skipping"),
                       pkg_name(pkg, pnaw_nonambig),
                       versiondescribe(&pkg->installed.version, vdew_nonambig),
                       versiondescribe(&pkg->available.version, vdew_nonambig));
diff --git a/src/main/cleanup.c b/src/main/cleanup.c
index 3f3ae7bfd..ca31e70fa 100644
--- a/src/main/cleanup.c
+++ b/src/main/cleanup.c
@@ -91,7 +91,7 @@ cu_installnew(int argc, void **argv)
                        debug_at(dbg_eachfiledetail, "restoring nonatomic");
                        if (secure_remove(fnamevb.buf) &&
                            errno != ENOENT && errno != ENOTDIR)
-                               ohshite(_("unable to remove newly-installed 
version of '%.250s' to allow"
+                               ohshite(_("unable to remove newly-installed 
version of '%s' to allow"
                                          " reinstallation of backup copy"),
                                        namenode->name);
                } else {
@@ -100,19 +100,19 @@ cu_installnew(int argc, void **argv)
 
                /* Either we can do an atomic restore, or we've made room: */
                if (rename(fnametmpvb.buf, fnamevb.buf))
-                       ohshite(_("unable to restore backup version of 
'%.250s'"),
+                       ohshite(_("unable to restore backup version of '%s'"),
                                namenode->name);
                /* If «pathname».dpkg-tmp was still a hard link to «pathname»,
                 * then the atomic rename did nothing, so we make sure to
                 * remove the backup. */
                else if (unlink(fnametmpvb.buf) && errno != ENOENT)
-                       ohshite(_("unable to remove backup copy of '%.250s'"),
+                       ohshite(_("unable to remove backup copy of '%s'"),
                                namenode->name);
        } else if (namenode->flags & FNNF_PLACED_ON_DISK) {
                debug_at(dbg_eachfiledetail, "removing new file");
                if (secure_remove(fnamevb.buf) &&
                    errno != ENOENT && errno != ENOTDIR)
-                       ohshite(_("unable to remove newly-installed version of 
'%.250s'"),
+                       ohshite(_("unable to remove newly-installed version of 
'%s'"),
                                namenode->name);
        } else {
                debug_at(dbg_eachfiledetail, "not restoring");
@@ -120,7 +120,7 @@ cu_installnew(int argc, void **argv)
        /* Whatever, we delete «pathname».dpkg-new now, if it still exists. */
        if (secure_remove(fnamenewvb.buf) &&
            errno != ENOENT && errno != ENOTDIR)
-               ohshite(_("unable to remove newly-extracted version of 
'%.250s'"),
+               ohshite(_("unable to remove newly-extracted version of '%s'"),
                        namenode->name);
 
        cleanup_pkg_failed--;
diff --git a/src/main/configure.c b/src/main/configure.c
index f99863cb5..8d166a59d 100644
--- a/src/main/configure.c
+++ b/src/main/configure.c
@@ -412,7 +412,7 @@ deferred_configure_conffile(struct pkginfo *pkg, struct 
conffile *conff)
                        deferred_configure_ghost_conffile(pkg, conff);
                        return;
                }
-               ohshite(_("unable to stat new distributed conffile '%.250s'"),
+               ohshite(_("unable to stat new distributed conffile '%s'"),
                        cdr_new.buf);
        }
        md5hash(pkg, newdisthash, cdr_new.buf);
@@ -422,7 +422,7 @@ deferred_configure_conffile(struct pkginfo *pkg, struct 
conffile *conff)
        if (!stat(cdr.buf, &stab))
                file_copy_perms(cdr.buf, cdr_new.buf);
        else if (errno != ENOENT)
-               ohshite(_("unable to stat current installed conffile '%.250s'"),
+               ohshite(_("unable to stat current installed conffile '%s'"),
                        cdr.buf);
 
        /* Select what to do. */
@@ -476,36 +476,36 @@ deferred_configure_conffile(struct pkginfo *pkg, struct 
conffile *conff)
        switch (what & ~(CFOF_IS_NEW | CFOF_USER_DEL)) {
        case CFO_KEEP | CFOF_BACKUP:
                if (unlink(cdr_old.buf) && errno != ENOENT)
-                       warning(_("%s: failed to remove old backup '%.250s': 
%s"),
+                       warning(_("%s: failed to remove old backup '%s': %s"),
                                pkg_name(pkg, pnaw_nonambig), cdr_old.buf,
                                strerror(errno));
 
                trig_path_activate(usenode, pkg);
                if (rename(cdr_new.buf, cdr_dist.buf))
-                       warning(_("%s: failed to rename '%.250s' to '%.250s': 
%s"),
+                       warning(_("%s: failed to rename '%s' to '%s': %s"),
                                pkg_name(pkg, pnaw_nonambig),
                                cdr_new.buf, cdr_dist.buf,
                                strerror(errno));
                break;
        case CFO_KEEP:
                if (unlink(cdr_new.buf))
-                       warning(_("%s: failed to remove '%.250s': %s"),
+                       warning(_("%s: failed to remove '%s': %s"),
                                pkg_name(pkg, pnaw_nonambig), cdr_new.buf,
                                strerror(errno));
                break;
        case CFO_INSTALL | CFOF_BACKUP:
                if (unlink(cdr_dist.buf) && errno != ENOENT)
-                       warning(_("%s: failed to remove old distributed version 
'%.250s': %s"),
+                       warning(_("%s: failed to remove old distributed version 
'%s': %s"),
                                pkg_name(pkg, pnaw_nonambig),
                                cdr_dist.buf,
                                strerror(errno));
                if (unlink(cdr_old.buf) && errno != ENOENT)
-                       warning(_("%s: failed to remove '%.250s' (before 
overwrite): %s"),
+                       warning(_("%s: failed to remove '%s' (before 
overwrite): %s"),
                                pkg_name(pkg, pnaw_nonambig), cdr_old.buf,
                                strerror(errno));
                if (!(what & CFOF_USER_DEL))
                        if (link(cdr.buf, cdr_old.buf))
-                               warning(_("%s: failed to link '%.250s' to 
'%.250s': %s"),
+                               warning(_("%s: failed to link '%s' to '%s': 
%s"),
                                        pkg_name(pkg, pnaw_nonambig),
                                        cdr.buf,
                                        cdr_old.buf, strerror(errno));
@@ -517,7 +517,7 @@ deferred_configure_conffile(struct pkginfo *pkg, struct 
conffile *conff)
        case CFO_NEW_CONFF:
                trig_path_activate(usenode, pkg);
                if (rename(cdr_new.buf, cdr.buf))
-                       ohshite(_("unable to install '%.250s' as '%.250s'"),
+                       ohshite(_("unable to install '%s' as '%s'"),
                                cdr_new.buf, cdr.buf);
                break;
        default:
@@ -550,12 +550,12 @@ deferred_configure(struct pkginfo *pkg)
                ohshit(_("no package named '%s' is installed, cannot 
configure"),
                       pkg_name(pkg, pnaw_nonambig));
        if (pkg->status == PKG_STAT_INSTALLED)
-               ohshit(_("package %.250s is already installed and configured"),
+               ohshit(_("package %s is already installed and configured"),
                       pkg_name(pkg, pnaw_nonambig));
        if (pkg->status != PKG_STAT_UNPACKED &&
            pkg->status != PKG_STAT_HALFCONFIGURED)
-               ohshit(_("package %.250s is not ready for configuration\n"
-                        " cannot configure (current status '%.250s')"),
+               ohshit(_("package %s is not ready for configuration\n"
+                        " cannot configure (current status '%s')"),
                       pkg_name(pkg, pnaw_nonambig),
                       pkg_status_name(pkg));
 
@@ -747,7 +747,7 @@ conffderef(struct pkginfo *pkg, struct varbuf *result, 
const char *in)
                                        result->buf, strerror(errno));
                                return -1;
                        } else if (linksize != stab.st_size) {
-                               warning(_("symbolic link '%.250s' size has "
+                               warning(_("symbolic link '%s' size has "
                                          "changed from %jd to %zd"),
                                        result->buf, (intmax_t)stab.st_size,
                                        linksize);
@@ -771,7 +771,7 @@ conffderef(struct pkginfo *pkg, struct varbuf *result, 
const char *in)
                                     r--)
                                        ;
                                if (r < 0) {
-                                       warning(_("%s: conffile '%.250s' 
resolves to degenerate filename\n"
+                                       warning(_("%s: conffile '%s' resolves 
to degenerate filename\n"
                                                  " ('%s' is a symlink to 
'%s')"),
                                                pkg_name(pkg, pnaw_nonambig),
                                                in, result->buf, target.buf);
@@ -786,7 +786,7 @@ conffderef(struct pkginfo *pkg, struct varbuf *result, 
const char *in)
                        }
                        varbuf_add_varbuf(result, &target);
                } else {
-                       warning(_("%s: conffile '%.250s' is not a plain file or 
symlink (= '%s')"),
+                       warning(_("%s: conffile '%s' is not a plain file or 
symlink (= '%s')"),
                                pkg_name(pkg, pnaw_nonambig), in, result->buf);
                        return -1;
                }
diff --git a/src/main/depcon.c b/src/main/depcon.c
index 8e31db083..fae685808 100644
--- a/src/main/depcon.c
+++ b/src/main/depcon.c
@@ -401,11 +401,11 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                        while ((pkg_pos = deppossi_pkg_iter_next(possi_iter))) {
                                switch (pkg_pos->clientdata->istobe) {
                                case PKG_ISTOBE_REMOVE:
-                                       varbuf_set_fmt(&linebuf, _("  %.250s is 
to be removed.\n"),
+                                       varbuf_set_fmt(&linebuf, _("  %s is to 
be removed.\n"),
                                                       pkg_name(pkg_pos, 
pnaw_nonambig));
                                        break;
                                case PKG_ISTOBE_DECONFIGURE:
-                                       varbuf_set_fmt(&linebuf, _("  %.250s is 
to be deconfigured.\n"),
+                                       varbuf_set_fmt(&linebuf, _("  %s is to 
be deconfigured.\n"),
                                                       pkg_name(pkg_pos, 
pnaw_nonambig));
                                        break;
                                case PKG_ISTOBE_INSTALLNEW:
@@ -415,8 +415,8 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                                                return true;
                                        }
 
-                                       varbuf_set_fmt(&linebuf, _("  %.250s is 
to be installed, "
-                                                                  "but is 
version %.250s.\n"),
+                                       varbuf_set_fmt(&linebuf, _("  %s is to 
be installed, "
+                                                                  "but is 
version %s.\n"),
                                                       pkgbin_name(pkg_pos, 
&pkg_pos->available, pnaw_nonambig),
                                                       
versiondescribe(&pkg_pos->available.version, vdew_nonambig));
                                        break;
@@ -431,8 +431,8 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                                                        return true;
                                                }
 
-                                               varbuf_set_fmt(&linebuf, _("  
%.250s is installed, "
-                                                                          "but 
is version %.250s.\n"),
+                                               varbuf_set_fmt(&linebuf, _("  
%s is installed, "
+                                                                          "but 
is version %s.\n"),
                                                               
pkg_name(pkg_pos, pnaw_nonambig),
                                                               
versiondescribe(&pkg_pos->installed.version, vdew_nonambig));
                                                break;
@@ -450,13 +450,13 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                                        case PKG_STAT_HALFCONFIGURED:
                                                if (allowunconfigd) {
                                                        if 
(!dpkg_version_is_informative(&pkg_pos->configversion)) {
-                                                               
varbuf_set_fmt(&linebuf, _("  %.250s is unpacked, "
+                                                               
varbuf_set_fmt(&linebuf, _("  %s is unpacked, "
                                                                                
           "but has never been configured.\n"),
                                                                               
pkg_name(pkg_pos, pnaw_nonambig));
                                                                break;
                                                        } else if 
(!versionsatisfied(&pkg_pos->installed, possi)) {
-                                                               
varbuf_set_fmt(&linebuf, _("  %.250s is unpacked, "
-                                                                               
           "but is version %.250s.\n"),
+                                                               
varbuf_set_fmt(&linebuf, _("  %s is unpacked, "
+                                                                               
           "but is version %s.\n"),
                                                                               
pkg_name(pkg_pos, pnaw_nonambig),
                                                                               
versiondescribe(&pkg_pos->installed.version,
                                                                                
               vdew_nonambig));
@@ -464,8 +464,8 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                                                        } else if 
(!dpkg_version_relate(&pkg_pos->configversion,
                                                                                
        possi->verrel,
                                                                                
        &possi->version)) {
-                                                               
varbuf_set_fmt(&linebuf, _("  %.250s latest configured "
-                                                                               
           "version is %.250s.\n"),
+                                                               
varbuf_set_fmt(&linebuf, _("  %s latest configured "
+                                                                               
           "version is %s.\n"),
                                                                               
pkg_name(pkg_pos, pnaw_nonambig),
                                                                               
versiondescribe(&pkg_pos->configversion,
                                                                                
               vdew_nonambig));
@@ -478,7 +478,7 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                                                }
                                                /* Fall through. */
                                        default:
-                                               varbuf_set_fmt(&linebuf, _("  
%.250s is %s.\n"),
+                                               varbuf_set_fmt(&linebuf, _("  
%s is %s.\n"),
                                                               
pkg_name(pkg_pos, pnaw_nonambig),
                                                               
gettext(statusstrings[pkg_pos->status]));
                                                break;
@@ -525,13 +525,13 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                                         * information above. */
                                        continue;
                                case PKG_ISTOBE_REMOVE:
-                                       varbuf_set_fmt(&linebuf, _("  %.250s 
provides %.250s "
+                                       varbuf_set_fmt(&linebuf, _("  %s 
provides %s "
                                                                   "but is to 
be removed.\n"),
                                                       
pkg_name(provider->up->up, pnaw_nonambig),
                                                       possi->ed->name);
                                        break;
                                case PKG_ISTOBE_DECONFIGURE:
-                                       varbuf_set_fmt(&linebuf, _("  %.250s 
provides %.250s "
+                                       varbuf_set_fmt(&linebuf, _("  %s 
provides %s "
                                                                   "but is to 
be deconfigured.\n"),
                                                       
pkg_name(provider->up->up, pnaw_nonambig),
                                                       possi->ed->name);
@@ -547,7 +547,7 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                                        if (provider->up->up->status == 
PKG_STAT_TRIGGERSAWAITED)
                                                *canfixbytrigaw = 
provider->up->up;
 
-                                       varbuf_set_fmt(&linebuf, _("  %.250s 
provides %.250s but is %s.\n"),
+                                       varbuf_set_fmt(&linebuf, _("  %s 
provides %s but is %s.\n"),
                                                       
pkg_name(provider->up->up, pnaw_nonambig),
                                                       possi->ed->name,
                                                       
gettext(statusstrings[provider->up->up->status]));
@@ -562,7 +562,7 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                        if (linebuf.used == 0) {
                                /* If the package wasn't installed at all, and 
we haven't said
                                 * yet why this isn't satisfied, we should say 
so now. */
-                               varbuf_set_fmt(&linebuf, _("  %.250s is not 
installed.\n"),
+                               varbuf_set_fmt(&linebuf, _("  %s is not 
installed.\n"),
                                               possi->ed->name);
                                varbuf_add_varbuf(whynot, &linebuf);
                        }
@@ -599,7 +599,7 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                                        if 
(!versionsatisfied(&pkg_pos->available, possi))
                                                break;
 
-                                       varbuf_add_fmt(whynot, _("  %.250s 
(version %.250s) is "
+                                       varbuf_add_fmt(whynot, _("  %s (version 
%s) is "
                                                                 "to be 
installed.\n"),
                                                       pkgbin_name(pkg_pos, 
&pkg_pos->available,
                                                                   
pnaw_nonambig),
@@ -638,7 +638,7 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                                                if 
(!versionsatisfied(&pkg_pos->installed, possi))
                                                        break;
 
-                                               varbuf_add_fmt(whynot, _("  
%.250s (version %.250s) is "
+                                               varbuf_add_fmt(whynot, _("  %s 
(version %s) is "
                                                                         
"present and %s.\n"),
                                                               
pkg_name(pkg_pos, pnaw_nonambig),
                                                               
versiondescribe(&pkg_pos->installed.version,
@@ -676,7 +676,7 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                                if (!pkg_virtual_deppossi_satisfied(possi, 
provider))
                                        continue;
 
-                               varbuf_add_fmt(whynot, _("  %.250s provides 
%.250s and is "
+                               varbuf_add_fmt(whynot, _("  %s provides %s and 
is "
                                                         "to be installed.\n"),
                                               pkgbin_name(provider->up->up, 
&provider->up->up->available,
                                                           pnaw_nonambig), 
possi->ed->name);
@@ -731,7 +731,7 @@ depisok(struct dependency *dep, struct varbuf *whynot,
                                        case PKG_STAT_INSTALLED:
                                        case PKG_STAT_TRIGGERSPENDING:
                                        case PKG_STAT_TRIGGERSAWAITED:
-                                               varbuf_add_fmt(whynot, _("  
%.250s provides %.250s and "
+                                               varbuf_add_fmt(whynot, _("  %s 
provides %s and "
                                                                         "is 
present and %s.\n"),
                                                               
pkg_name(provider->up->up, pnaw_nonambig),
                                                               possi->ed->name,
diff --git a/src/main/enquiry.c b/src/main/enquiry.c
index 479653435..f05273333 100644
--- a/src/main/enquiry.c
+++ b/src/main/enquiry.c
@@ -617,7 +617,7 @@ predeppackage(const char *const *argv)
                        varbuf_reset(&vb);
                        describedepcon(&vb, dep);
                        notice(_("cannot see how to satisfy pre-dependency:\n 
%s"), vb.buf);
-                       ohshit(_("cannot satisfy pre-dependencies for %.250s 
(wanted due to %.250s)"),
+                       ohshit(_("cannot satisfy pre-dependencies for %s 
(wanted due to %s)"),
                               pkgbin_name(dep->up, &dep->up->available, 
pnaw_nonambig),
                               pkgbin_name(startpkg, &startpkg->available, 
pnaw_nonambig));
                }
diff --git a/src/main/main.c b/src/main/main.c
index 7d01c5ab1..42605872f 100644
--- a/src/main/main.c
+++ b/src/main/main.c
@@ -298,7 +298,7 @@ set_ignore_depends(const struct cmdinfo *cip, const char 
*value)
 
                *p++ = '\0';
                if (!*p || *p == ',' || p == copy + 1)
-                       badusage(_("null package name in --%s comma-separated 
list '%.250s'"),
+                       badusage(_("null package name in --%s comma-separated 
list '%s'"),
                                 cip->olong, value);
        }
 
diff --git a/src/main/packages.c b/src/main/packages.c
index 69419715b..cc5425813 100644
--- a/src/main/packages.c
+++ b/src/main/packages.c
@@ -302,8 +302,8 @@ process_queue(void)
                switch (action_todo) {
                case act_triggers:
                        if (!pkg->trigpend_head)
-                               ohshit(_("package %.250s is not ready for 
trigger processing\n"
-                                        " (current status '%.250s' with no 
pending triggers)"),
+                               ohshit(_("package %s is not ready for trigger 
processing\n"
+                                        " (current status '%s' with no pending 
triggers)"),
                                       pkg_name(pkg, pnaw_nonambig),
                                       pkg_status_name(pkg));
                        /* Fall through. */
diff --git a/src/main/remove.c b/src/main/remove.c
index 25edfbdca..1c72ecdc9 100644
--- a/src/main/remove.c
+++ b/src/main/remove.c
@@ -122,7 +122,7 @@ deferred_remove(struct pkginfo *pkg)
 
        if (pkg->status == PKG_STAT_NOTINSTALLED) {
                sincenothing = 0;
-               warning(_("ignoring request to remove %.250s which isn't 
installed"),
+               warning(_("ignoring request to remove %s which isn't 
installed"),
                        pkg_name(pkg, pnaw_nonambig));
                pkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
 
@@ -131,7 +131,7 @@ deferred_remove(struct pkginfo *pkg)
                   pkg->status == PKG_STAT_CONFIGFILES &&
                   cipaction->arg_int != act_purge) {
                sincenothing = 0;
-               warning(_("ignoring request to remove %.250s, only the config\n"
+               warning(_("ignoring request to remove %s, only the config\n"
                          " files of which are on the system; use --purge to 
remove them too"),
                        pkg_name(pkg, pnaw_nonambig));
                pkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
@@ -249,7 +249,7 @@ removal_bulk_remove_file(const char *filename, const char 
*filetype)
        debug_at(dbg_stupidlyverbose, "metadata file not postrm nor list");
 
        if (unlink(filename))
-               ohshite(_("unable to delete package metadata file '%.250s'"),
+               ohshite(_("unable to delete package metadata file '%s'"),
                        filename);
 
        debug_at(dbg_scripts, "metadata file unlinked %s", filename);
@@ -376,7 +376,7 @@ removal_bulk_remove_files(struct pkginfo *pkg)
                        push_leftover(&leftover, namenode);
                        continue;
                } else if (errno == EBUSY || errno == EPERM) {
-                       warning(_("while removing %.250s, unable to remove 
directory '%.250s': "
+                       warning(_("while removing %s, unable to remove 
directory '%s': "
                                  "%s - directory may be a mount point?"),
                                pkg_name(pkg, pnaw_nonambig), namenode->name,
                                strerror(errno));
@@ -384,10 +384,10 @@ removal_bulk_remove_files(struct pkginfo *pkg)
                        continue;
                }
                if (errno != ENOTDIR)
-                       ohshite(_("cannot remove '%.250s'"), fnvb.buf);
+                       ohshite(_("cannot remove '%s'"), fnvb.buf);
                debug_at(dbg_eachfiledetail, "unlinking '%s'", fnvb.buf);
                if (secure_unlink(fnvb.buf))
-                       ohshite(_("unable to securely remove '%.250s'"),
+                       ohshite(_("unable to securely remove '%s'"),
                                fnvb.buf);
        }
        write_filelist_except(pkg, &pkg->installed, leftover, 0);
@@ -474,12 +474,12 @@ removal_bulk_remove_leftover_dirs(struct pkginfo *pkg)
                if (!rmdir(fnvb.buf) || errno == ENOENT || errno == ELOOP)
                        continue;
                if (errno == ENOTEMPTY || errno == EEXIST) {
-                       warning(_("while removing %.250s, directory '%.250s' 
not empty so not removed"),
+                       warning(_("while removing %s, directory '%s' not empty 
so not removed"),
                                pkg_name(pkg, pnaw_nonambig), namenode->name);
                        push_leftover(&leftover, namenode);
                        continue;
                } else if (errno == EBUSY || errno == EPERM) {
-                       warning(_("while removing %.250s, unable to remove 
directory '%.250s': "
+                       warning(_("while removing %s, unable to remove 
directory '%s': "
                                  "%s - directory may be a mount point?"),
                                pkg_name(pkg, pnaw_nonambig), namenode->name,
                                strerror(errno));
@@ -487,14 +487,14 @@ removal_bulk_remove_leftover_dirs(struct pkginfo *pkg)
                        continue;
                }
                if (errno != ENOTDIR)
-                       ohshite(_("cannot remove '%.250s'"), fnvb.buf);
+                       ohshite(_("cannot remove '%s'"), fnvb.buf);
 
                if (lstat(fnvb.buf, &stab) == 0 && S_ISLNK(stab.st_mode)) {
                        debug_at(dbg_eachfiledetail,
                                 "is a symlink to a directory");
 
                        if (unlink(fnvb.buf))
-                               ohshite(_("cannot remove '%.250s'"), fnvb.buf);
+                               ohshite(_("cannot remove '%s'"), fnvb.buf);
 
                        continue;
                }
@@ -596,7 +596,7 @@ removal_bulk_remove_configfiles(struct pkginfo *pkg)
 
                conffnameused = fnvb.used;
                if (unlink(fnvb.buf) && errno != ENOENT && errno != ENOTDIR)
-                       ohshite(_("cannot remove old config file '%.250s' (= 
'%.250s')"),
+                       ohshite(_("cannot remove old config file '%s' (= 
'%s')"),
                                conff->name, fnvb.buf);
                p = strrchr(fnvb.buf, '/');
                if (!p)
@@ -616,7 +616,7 @@ removal_bulk_remove_configfiles(struct pkginfo *pkg)
                        errno = e;
                        if (errno == ENOENT || errno == ENOTDIR)
                                continue;
-                       ohshite(_("cannot read config file directory '%.250s' 
(from '%.250s')"),
+                       ohshite(_("cannot read config file directory '%s' (from 
'%s')"),
                                fnvb.buf, conff->name);
                }
                debug_at(dbg_conffdetail, "conffile cleaning dir %s", fnvb.buf);
@@ -665,7 +665,7 @@ removal_bulk_remove_configfiles(struct pkginfo *pkg)
                        if (unlink(removevb.buf) &&
                            errno != ENOENT &&
                            errno != ENOTDIR)
-                               ohshite(_("cannot remove old backup config file 
'%.250s' (of '%.250s')"),
+                               ohshite(_("cannot remove old backup config file 
'%s' (of '%s')"),
                                        removevb.buf, conff->name);
                }
                pop_cleanup(ehflag_normaltidy); /* closedir */
diff --git a/src/main/script.c b/src/main/script.c
index a04f891a2..dd3f3a4bb 100644
--- a/src/main/script.c
+++ b/src/main/script.c
@@ -89,7 +89,7 @@ setexecute(const char *path, struct stat *stab)
        if (!chmod(path, 0755))
                return;
 
-       ohshite(_("unable to set execute permissions on '%.250s'"), path);
+       ohshite(_("unable to set execute permissions on '%s'"), path);
 }
 
 /**
@@ -124,13 +124,13 @@ maintscript_pre_exec(struct command *cmd)
                                 "directory with --force-not-root, consider "
                                 "using --force-script-chrootless?"));
                else if (rc)
-                       ohshite(_("failed to chroot to '%.250s'"), instdir);
+                       ohshite(_("failed to chroot to '%s'"), instdir);
        }
 
        /* Switch to a known good directory to give the maintainer script
         * a saner environment, also needed after the chroot(). */
        if (chdir(changedir))
-               ohshite(_("failed to chdir to '%.255s'"), changedir);
+               ohshite(_("failed to chdir to '%s'"), changedir);
 
        if (debug_has_flag(dbg_scripts)) {
                struct varbuf args = VARBUF_INIT;
@@ -242,7 +242,7 @@ vmaintscript_run_old(struct pkginfo *pkg,
                        free(scriptdesc);
                        return 0;
                }
-               ohshite(_("unable to stat %s '%.250s'"), scriptdesc, 
scriptpath);
+               ohshite(_("unable to stat %s '%s'"), scriptdesc, scriptpath);
        }
        maintscript_exec(pkg, &pkg->installed, &cmd, &stab, 0);
 
@@ -317,7 +317,7 @@ maintscript_run_new(struct pkginfo *pkg,
                        free(scriptdesc);
                        return 0;
                }
-               ohshite(_("unable to stat %s '%.250s'"), scriptdesc, cidir);
+               ohshite(_("unable to stat %s '%s'"), scriptdesc, cidir);
        }
        maintscript_exec(pkg, &pkg->available, &cmd, &stab, 0);
 
@@ -356,7 +356,7 @@ maintscript_run_old_or_new(struct pkginfo *pkg,
                        free(scriptdesc);
                        return 0;
                }
-               warning(_("unable to stat %s '%.250s': %s"),
+               warning(_("unable to stat %s '%s': %s"),
                        cmd.name, oldscriptpath, strerror(errno));
        } else if (!maintscript_exec(pkg, &pkg->installed, &cmd, &stab, 
SUBPROC_WARN)) {
                command_destroy(&cmd);
@@ -387,7 +387,7 @@ maintscript_run_old_or_new(struct pkginfo *pkg,
                        ohshit(_("missing %s maintainer script in new %s 
package, giving up"),
                               scriptname, pkg_name(pkg, pnaw_nonambig));
                else
-                       ohshite(_("unable to stat %s '%.250s'"), scriptdesc, 
cidir);
+                       ohshite(_("unable to stat %s '%s'"), scriptdesc, cidir);
        }
 
        maintscript_exec(pkg, &pkg->available, &cmd, &stab, 0);
diff --git a/src/main/select.c b/src/main/select.c
index 6fb4e8118..6dfd1f24e 100644
--- a/src/main/select.c
+++ b/src/main/select.c
@@ -195,12 +195,12 @@ setselections(const char *const *argv)
                }
                pkg = pkg_spec_parse_pkg(varbuf_str(&namevb), &err);
                if (pkg == NULL)
-                       ohshit(_("invalid package name at line %d: %.250s"), 
lno, err.str);
+                       ohshit(_("invalid package name at line %d: %s"), lno, 
err.str);
 
                if (!pkg_is_informative(pkg, &pkg->installed) &&
                    !pkg_is_informative(pkg, &pkg->available)) {
                        db_possibly_outdated = true;
-                       warning(_("package not in status nor available database 
at line %d: %.250s"),
+                       warning(_("package not in status nor available database 
at line %d: %s"),
                                lno, varbuf_str(&namevb));
                        lno++;
                        continue;
@@ -208,7 +208,7 @@ setselections(const char *const *argv)
 
                nv = namevalue_find_by_name(wantinfos, varbuf_str(&selvb));
                if (nv == NULL)
-                       ohshit(_("unknown wanted status at line %d: %.250s"),
+                       ohshit(_("unknown wanted status at line %d: %s"),
                               lno, varbuf_str(&selvb));
 
                pkg_set_want(pkg, nv->value);
diff --git a/src/main/unpack.c b/src/main/unpack.c
index 1c6cbd14b..b8347f252 100644
--- a/src/main/unpack.c
+++ b/src/main/unpack.c
@@ -99,7 +99,7 @@ deb_reassemble(const char **filename, const char **pfilename)
        if (!reasmbuf)
                reasmbuf = dpkg_db_get_path(REASSEMBLETMP);
        if (unlink(reasmbuf) && errno != ENOENT)
-               ohshite(_("error ensuring '%.250s' doesn't exist"), reasmbuf);
+               ohshite(_("error ensuring '%s' doesn't exist"), reasmbuf);
 
        push_cleanup(cu_pathname, ~0, 1, (void *)reasmbuf);
 
@@ -267,7 +267,7 @@ pkg_check_depcon(struct pkginfo *pkg, const char *pfilename)
                                               pkgbin_name(pkg, 
&pkg->available, pnaw_nonambig),
                                               varbuf_str(&depprobwhy));
                                        if (!force_depends(dsearch->list))
-                                               ohshit(_("pre-dependency 
problem - not installing %.250s"),
+                                               ohshit(_("pre-dependency 
problem - not installing %s"),
                                                       pkgbin_name(pkg, 
&pkg->available, pnaw_nonambig));
                                        warning(_("ignoring pre-dependency 
problem!"));
                                }
@@ -363,7 +363,7 @@ deb_parse_conffiles(const struct pkginfo *pkg, const char 
*control_conffiles,
        if (conff == NULL) {
                if (errno == ENOENT)
                        return;
-               ohshite(_("error trying to open %.250s"), control_conffiles);
+               ohshite(_("error trying to open %s"), control_conffiles);
        }
 
        push_cleanup(cu_closestream, ehflag_bombout, 1, conff);
@@ -473,10 +473,10 @@ deb_parse_conffiles(const struct pkginfo *pkg, const char 
*control_conffiles,
        }
 
        if (ferror(conff))
-               ohshite(_("read error in %.250s"), control_conffiles);
+               ohshite(_("read error in %s"), control_conffiles);
        pop_cleanup(ehflag_normaltidy); /* conff = fopen() */
        if (fclose(conff))
-               ohshite(_("error closing %.250s"), control_conffiles);
+               ohshite(_("error closing %s"), control_conffiles);
 }
 
 static struct pkg_queue conflictors = PKG_QUEUE_INIT;
@@ -491,7 +491,7 @@ static void
 pkg_infodb_remove_file(const char *filename, const char *filetype)
 {
        if (unlink(filename))
-               ohshite(_("unable to delete package metadata file '%.250s'"),
+               ohshite(_("unable to delete package metadata file '%s'"),
                        filename);
 
        debug_at(dbg_scripts, "metadata file unlinked %s", filename);
@@ -542,12 +542,12 @@ pkg_infodb_update(struct pkginfo *pkg, char *cidir, char 
*cidirrest)
                } else if (errno == ENOENT) {
                        /* Right, no new version. */
                        if (unlink(match_node->filename))
-                               ohshite(_("unable to remove obsolete package 
metadata file '%.250s'"),
+                               ohshite(_("unable to remove obsolete package 
metadata file '%s'"),
                                        match_node->filename);
                        debug_at(dbg_scripts, "metadata file unlinked %s",
                                 match_node->filename);
                } else {
-                       ohshite(_("unable to install (supposed) new package 
metadata file '%.250s'"),
+                       ohshite(_("unable to install (supposed) new package 
metadata file '%s'"),
                                cidir);
                }
                match_head = match_node->next;
@@ -578,10 +578,10 @@ pkg_infodb_update(struct pkginfo *pkg, char *cidir, char 
*cidirrest)
 
                /* First we check it's not a directory. */
                if (rmdir(cidir) == 0)
-                       ohshit(_("package metadata contained directory 
'%.250s'"),
+                       ohshit(_("package metadata contained directory '%s'"),
                               cidir);
                else if (errno != ENOTDIR)
-                       ohshite(_("package metadata rmdir of '%.250s' didn't 
say not a dir"),
+                       ohshite(_("package metadata rmdir of '%s' didn't say 
not a dir"),
                                de->d_name);
 
                /* Ignore the control file. */
@@ -601,7 +601,7 @@ pkg_infodb_update(struct pkginfo *pkg, char *cidir, char 
*cidirrest)
                /* Right, install it. */
                newinfofilename = pkg_infodb_get_file(pkg, &pkg->available, 
de->d_name);
                if (rename(cidir, newinfofilename))
-                       ohshite(_("unable to install new metadata file '%.250s' 
as '%.250s'"),
+                       ohshite(_("unable to install new metadata file '%s' as 
'%s'"),
                                cidir, newinfofilename);
 
                debug_at(dbg_scripts,
@@ -670,7 +670,7 @@ pkg_remove_conffile_on_upgrade(struct pkginfo *pkg,
        varbuf_add_str(&cdrext, DPKGDISTEXT);
 
        if (unlink(cdrext.buf) < 0 && errno != ENOENT)
-               warning(_("%s: failed to remove '%.250s': %s"),
+               warning(_("%s: failed to remove '%s': %s"),
                        pkg_name(pkg, pnaw_nonambig), cdrext.buf,
                        strerror(errno));
 
@@ -684,7 +684,7 @@ pkg_remove_conffile_on_upgrade(struct pkginfo *pkg,
        if (strcmp(currenthash, namenode->oldhash) == 0) {
                printf(_("Removing obsolete conffile %s ...\n"), cdr.buf);
                if (unlink(cdr.buf) < 0 && errno != ENOENT)
-                       warning(_("%s: failed to remove '%.250s': %s"),
+                       warning(_("%s: failed to remove '%s': %s"),
                                pkg_name(pkg, pnaw_nonambig), cdr.buf,
                                strerror(errno));
                return;
@@ -756,7 +756,7 @@ pkg_remove_old_files(struct pkginfo *pkg,
                        if (!(errno == ENOENT ||
                              errno == ELOOP ||
                              errno == ENOTDIR))
-                               warning(_("could not stat old file '%.250s' so 
not deleting it: %s"),
+                               warning(_("could not stat old file '%s' so not 
deleting it: %s"),
                                        varbuf_str(&fnamevb), strerror(errno));
                        continue;
                }
@@ -768,10 +768,10 @@ pkg_remove_old_files(struct pkginfo *pkg,
                                continue;
 
                        if (rmdir(varbuf_str(&fnamevb))) {
-                               warning(_("unable to delete old directory 
'%.250s': %s"),
+                               warning(_("unable to delete old directory '%s': 
%s"),
                                        namenode->name, strerror(errno));
                        } else if ((namenode->flags & FNNF_OLD_CONFF)) {
-                               warning(_("old conffile '%.250s' was an empty 
directory "
+                               warning(_("old conffile '%s' was an empty 
directory "
                                          "(and has now been deleted)"),
                                        namenode->name);
                        }
@@ -821,7 +821,7 @@ pkg_remove_old_files(struct pkginfo *pkg,
                                                cfile->namenode->file_ondisk_id 
= file_ondisk_id;
                                        } else {
                                                if (!(errno == ENOENT || errno 
== ELOOP || errno == ENOTDIR))
-                                                       ohshite(_("unable to 
stat other new file '%.250s'"),
+                                                       ohshite(_("unable to 
stat other new file '%s'"),
                                                                
cfile->namenode->name);
                                                cfile->namenode->file_ondisk_id 
= &empty_ondisk_id;
                                                continue;
@@ -834,8 +834,8 @@ pkg_remove_old_files(struct pkginfo *pkg,
                                if (oldfs.st_dev == 
cfile->namenode->file_ondisk_id->id_dev &&
                                    oldfs.st_ino == 
cfile->namenode->file_ondisk_id->id_ino) {
                                        if (sameas)
-                                               warning(_("old file '%.250s' is 
the same as several new files! "
-                                                         "(both '%.250s' and 
'%.250s')"), varbuf_str(&fnamevb),
+                                               warning(_("old file '%s' is the 
same as several new files! "
+                                                         "(both '%s' and 
'%s')"), varbuf_str(&fnamevb),
                                                        sameas->namenode->name, 
cfile->namenode->name);
                                        sameas = cfile;
                                        debug_at(dbg_eachfile, "not removing 
%s, since it matches %s",
@@ -876,7 +876,7 @@ pkg_remove_old_files(struct pkginfo *pkg,
                        trig_path_activate(usenode, pkg);
 
                        if (secure_unlink_statted(varbuf_str(&fnamevb), 
&oldfs)) {
-                               warning(_("unable to securely remove old file 
'%.250s': %s"),
+                               warning(_("unable to securely remove old file 
'%s': %s"),
                                        namenode->name, strerror(errno));
                        }
                } /* !S_ISDIR */
diff --git a/src/split/info.c b/src/split/info.c
index a96d94d10..0ee61d3c6 100644
--- a/src/split/info.c
+++ b/src/split/info.c
@@ -52,7 +52,7 @@ parse_intmax(const char *value, const char *fn, const char 
*what)
        errno = 0;
        ret = strtoimax(value, &endp, 10);
        if (value == endp || *endp)
-               ohshit(_("file '%.250s' is corrupt - bad digit (code %d) in 
%s"),
+               ohshit(_("file '%s' is corrupt - bad digit (code %d) in %s"),
                       fn, *endp, what);
        if (ret < 0 || errno == ERANGE)
                ohshit(_("file '%s' is corrupt; out of range integer in %s"),
@@ -68,11 +68,11 @@ nextline(char **ripp, const char *fn, const char *what)
 
        rip = *ripp;
        if (!rip)
-               ohshit(_("file '%.250s' is corrupt - %.250s missing"),
+               ohshit(_("file '%s' is corrupt - %s missing"),
                       fn, what);
        newline = strchr(rip, '\n');
        if (!newline)
-               ohshit(_("file '%.250s' is corrupt - missing newline after 
%.250s"),
+               ohshit(_("file '%s' is corrupt - missing newline after %s"),
                       fn, what);
        *ripp = newline + 1;
 
@@ -103,7 +103,7 @@ read_info(struct dpkg_ar *ar, struct partinfo *ir)
        rc = fd_read(ar->fd, magicbuf, sizeof(magicbuf));
        if (rc != sizeof(magicbuf)) {
                if (rc < 0)
-                       ohshite(_("error reading %.250s"), ar->name);
+                       ohshite(_("error reading %s"), ar->name);
                else
                        return NULL;
        }
@@ -119,7 +119,7 @@ read_info(struct dpkg_ar *ar, struct partinfo *ir)
        if (strncmp(arh.ar_name, PARTMAGIC, sizeof(arh.ar_name)) != 0)
                return NULL;
        if (dpkg_ar_member_is_invalid(&arh))
-               ohshit(_("file '%.250s' is corrupt - bad magic at end of first 
header"),
+               ohshit(_("file '%s' is corrupt - bad magic at end of first 
header"),
                       ar->name);
        thisilen = dpkg_ar_member_get_size(ar, &arh);
 
@@ -133,12 +133,12 @@ read_info(struct dpkg_ar *ar, struct partinfo *ir)
                int c = format_member.buf[thisilen];
 
                if (c != '\n')
-                       ohshit(_("file '%.250s' is corrupt - bad padding 
character (code %d)"),
+                       ohshit(_("file '%s' is corrupt - bad padding character 
(code %d)"),
                               ar->name, c);
        }
        varbuf_trunc(&format_member, thisilen);
        if (memchr(format_member.buf, 0, thisilen))
-               ohshit(_("file '%.250s' is corrupt - nulls in info section"),
+               ohshit(_("file '%s' is corrupt - nulls in info section"),
                       ar->name);
 
        ir->filename = ar->name;
@@ -148,10 +148,10 @@ read_info(struct dpkg_ar *ar, struct partinfo *ir)
                                nextline(&rip, ar->name,
                                         _("format version number")));
        if (err)
-               ohshit(_("file '%.250s' has invalid format version: %s"),
+               ohshit(_("file '%s' has invalid format version: %s"),
                       ar->name, err);
        if (ir->fmtversion.major != 2)
-               ohshit(_("file '%.250s' is format version %d.%d; get a newer 
dpkg-split"),
+               ohshit(_("file '%s' is format version %d.%d; get a newer 
dpkg-split"),
                       ar->name, ir->fmtversion.major, ir->fmtversion.minor);
 
        ir->package = nfstrsave(nextline(&rip, ar->name, _("package name")));
@@ -161,7 +161,7 @@ read_info(struct dpkg_ar *ar, struct partinfo *ir)
                                        _("package file MD5 checksum")));
        if (strlen(ir->md5sum) != MD5HASHLEN ||
            strspn(ir->md5sum, "0123456789abcdef") != MD5HASHLEN)
-               ohshit(_("file '%.250s' is corrupt - bad MD5 checksum 
'%.250s'"),
+               ohshit(_("file '%s' is corrupt - bad MD5 checksum '%s'"),
                       ar->name, ir->md5sum);
 
        ir->orglength = parse_intmax(nextline(&rip, ar->name,
@@ -174,18 +174,18 @@ read_info(struct dpkg_ar *ar, struct partinfo *ir)
        partnums = nextline(&rip, ar->name, _("archive part numbers"));
        slash = strchr(partnums, '/');
        if (!slash)
-               ohshit(_("file '%.250s' is corrupt - no slash between archive 
part numbers"),
+               ohshit(_("file '%s' is corrupt - no slash between archive part 
numbers"),
                       ar->name);
        *slash++ = '\0';
 
        templong = parse_intmax(slash, ar->name, _("number of archive parts"));
        if (templong <= 0 || templong > INT_MAX)
-               ohshit(_("file '%.250s' is corrupt - bad number of archive 
parts"),
+               ohshit(_("file '%s' is corrupt - bad number of archive parts"),
                       ar->name);
        ir->maxpartn = templong;
        templong = parse_intmax(partnums, ar->name, _("archive parts number"));
        if (templong <= 0 || templong > ir->maxpartn)
-               ohshit(_("file '%.250s' is corrupt - bad archive part number"),
+               ohshit(_("file '%s' is corrupt - bad archive part number"),
                       ar->name);
        ir->thispartn = templong;
 
@@ -204,22 +204,22 @@ read_info(struct dpkg_ar *ar, struct partinfo *ir)
        dpkg_ar_normalize_name(&arh);
 
        if (dpkg_ar_member_is_invalid(&arh))
-               ohshit(_("file '%.250s' is corrupt - bad magic at end of second 
header"),
+               ohshit(_("file '%s' is corrupt - bad magic at end of second 
header"),
                       ar->name);
        if (strncmp(arh.ar_name, "data", 4))
-               ohshit(_("file '%.250s' is corrupt - second member is not data 
member"),
+               ohshit(_("file '%s' is corrupt - second member is not data 
member"),
                       ar->name);
 
        ir->thispartlen = dpkg_ar_member_get_size(ar, &arh);
        ir->thispartoffset = (ir->thispartn - 1) * ir->maxpartlen;
 
        if (ir->maxpartn != (ir->orglength + ir->maxpartlen - 1) / 
ir->maxpartlen)
-               ohshit(_("file '%.250s' is corrupt - wrong number of parts for 
quoted sizes"),
+               ohshit(_("file '%s' is corrupt - wrong number of parts for 
quoted sizes"),
                       ar->name);
        if (ir->thispartlen != (ir->thispartn == ir->maxpartn ?
                                ir->orglength - ir->thispartoffset :
                                ir->maxpartlen))
-               ohshit(_("file '%.250s' is corrupt - size is wrong for quoted 
part number"),
+               ohshit(_("file '%s' is corrupt - size is wrong for quoted part 
number"),
                       ar->name);
 
        ir->filesize = (strlen(DPKG_AR_MAGIC) +
@@ -230,7 +230,7 @@ read_info(struct dpkg_ar *ar, struct partinfo *ir)
                /* Don't do this check if it's coming from a pipe or
                 * something. It's only an extra sanity check anyway. */
                if (ar->size < ir->filesize)
-                       ohshit(_("file '%.250s' is corrupt - too short"),
+                       ohshit(_("file '%s' is corrupt - too short"),
                               ar->name);
        }
 
@@ -247,9 +247,9 @@ mustgetpartinfo(const char *filename, struct partinfo *ri)
 
        part = dpkg_ar_open(filename);
        if (!part)
-               ohshite(_("cannot open archive part file '%.250s'"), filename);
+               ohshite(_("cannot open archive part file '%s'"), filename);
        if (!read_info(part, ri))
-               ohshite(_("file '%.250s' is not an archive part"), filename);
+               ohshite(_("file '%s' is not an archive part"), filename);
        dpkg_ar_close(part);
 }
 
@@ -298,7 +298,7 @@ do_info(const char *const *argv)
 
                part = dpkg_ar_open(thisarg);
                if (!part)
-                       ohshite(_("cannot open archive part file '%.250s'"),
+                       ohshite(_("cannot open archive part file '%s'"),
                                thisarg);
                pi = read_info(part, &ps);
                dpkg_ar_close(part);
diff --git a/src/split/join.c b/src/split/join.c
index aefc2deef..7ad959189 100644
--- a/src/split/join.c
+++ b/src/split/join.c
@@ -50,14 +50,14 @@ reassemble(struct partinfo **partlist, const char 
*outputfile)
 
        fd_out = creat(outputfile, 0644);
        if (fd_out < 0)
-               ohshite(_("unable to open output file '%.250s'"), outputfile);
+               ohshite(_("unable to open output file '%s'"), outputfile);
        for (i = 0; i < partlist[0]->maxpartn; i++) {
                struct partinfo *pi = partlist[i];
                int fd_in;
 
                fd_in = open(pi->filename, O_RDONLY);
                if (fd_in < 0)
-                       ohshite(_("unable to (re)open input part file 
'%.250s'"),
+                       ohshite(_("unable to (re)open input part file '%s'"),
                                pi->filename);
                if (fd_skip(fd_in, pi->headerlen, &err) < 0)
                        ohshit(_("cannot skip split package header for '%s': 
%s"),
@@ -93,13 +93,13 @@ addtopartlist(struct partinfo **partlist,
            pi->maxpartlen != refi->maxpartlen) {
                print_info(pi);
                print_info(refi);
-               ohshit(_("files '%.250s' and '%.250s' are not parts of the same 
file"),
+               ohshit(_("files '%s' and '%s' are not parts of the same file"),
                       pi->filename, refi->filename);
        }
 
        i = pi->thispartn - 1;
        if (partlist[i])
-               ohshit(_("there are several versions of part %d - at least 
'%.250s' and '%.250s'"),
+               ohshit(_("there are several versions of part %d - at least '%s' 
and '%s'"),
                       pi->thispartn, pi->filename, partlist[i]->filename);
        partlist[i] = pi;
 }
diff --git a/src/split/main.c b/src/split/main.c
index 67dab69cb..a0b6f1c73 100644
--- a/src/split/main.c
+++ b/src/split/main.c
@@ -115,10 +115,10 @@ void DPKG_ATTR_NORET
 read_fail(int rc, const char *filename, const char *what)
 {
        if (rc >= 0)
-               ohshit(_("unexpected end of file in %s in %.255s"),
+               ohshit(_("unexpected end of file in %s in %s"),
                       what, filename);
        else
-               ohshite(_("error reading %s from file %.255s"), what, filename);
+               ohshite(_("error reading %s from file %s"), what, filename);
 }
 
 static void
@@ -130,7 +130,7 @@ set_part_size(const struct cmdinfo *cip, const char *value)
        errno = 0;
        newpartsize = strtoimax(value, &endp, 10);
        if (value == endp || *endp)
-               badusage(_("invalid integer for --%s: '%.250s'"),
+               badusage(_("invalid integer for --%s: '%s'"),
                         cip->olong, value);
        if (newpartsize <= 0 ||
            newpartsize > (INT_MAX >> 10) ||
diff --git a/src/split/queue.c b/src/split/queue.c
index e433a88c3..71bebc536 100644
--- a/src/split/queue.c
+++ b/src/split/queue.c
@@ -96,7 +96,7 @@ scandepot(void)
                if (errno == ENOENT)
                        return NULL;
 
-               ohshite(_("unable to read depot directory '%.250s'"),
+               ohshite(_("unable to read depot directory '%s'"),
                        opt_depotdir);
        }
        while ((de = readdir(depot))) {
@@ -162,13 +162,13 @@ do_auto(const char *const *argv)
        refi = nfmalloc(sizeof(*refi));
        part = dpkg_ar_open(partfile);
        if (!part)
-               ohshite(_("unable to read part file '%.250s'"), partfile);
+               ohshite(_("unable to read part file '%s'"), partfile);
        refi = read_info(part, refi);
        dpkg_ar_close(part);
 
        if (refi == NULL) {
                if (!opt_npquiet)
-                       printf(_("File '%.250s' is not part of a multipart 
archive.\n"),
+                       printf(_("File '%s' is not part of a multipart 
archive.\n"),
                               partfile);
                m_output(stdout, _("<standard output>"));
                return 1;
@@ -213,11 +213,11 @@ do_auto(const char *const *argv)
 
                fd_src = open(partfile, O_RDONLY);
                if (fd_src < 0)
-                       ohshite(_("unable to reopen part file '%.250s'"),
+                       ohshite(_("unable to reopen part file '%s'"),
                                partfile);
                fd_dst = creat(p, 0644);
                if (fd_dst < 0)
-                       ohshite(_("unable to open new depot file '%.250s'"), p);
+                       ohshite(_("unable to open new depot file '%s'"), p);
 
                if (fd_fd_copy(fd_src, fd_dst, refi->filesize, &err) < 0)
                        ohshit(_("cannot extract split package part '%s': %s"),
@@ -230,7 +230,7 @@ do_auto(const char *const *argv)
                close(fd_src);
 
                if (rename(p, q))
-                       ohshite(_("unable to rename new depot file '%.250s' to 
'%.250s'"),
+                       ohshite(_("unable to rename new depot file '%s' to 
'%s'"),
                                p, q);
                free(q);
                free(p);
@@ -256,7 +256,7 @@ do_auto(const char *const *argv)
                for (i = 0; i < refi->maxpartn; i++)
                        if (partlist[i])
                                if (unlink(partlist[i]->filename))
-                                       ohshite(_("unable to delete used-up 
depot file '%.250s'"),
+                                       ohshite(_("unable to delete used-up 
depot file '%s'"),
                                                partlist[i]->filename);
        }
 
@@ -288,7 +288,7 @@ do_queue(const char *const *argv)
                        part_found = true;
                }
                if (lstat(pq->info.filename, &stab))
-                       ohshit(_("unable to stat '%.250s'"), pq->info.filename);
+                       ohshit(_("unable to stat '%s'"), pq->info.filename);
                if (S_ISREG(stab.st_mode)) {
                        bytes = stab.st_size;
                        printf(_(" %s (%jd bytes)\n"),
@@ -327,10 +327,10 @@ do_queue(const char *const *argv)
                        if (qq) {
                                printf("%d ", i + 1);
                                if (lstat(qq->info.filename, &stab))
-                                       ohshite(_("unable to stat '%.250s'"),
+                                       ohshite(_("unable to stat '%s'"),
                                                qq->info.filename);
                                if (!S_ISREG(stab.st_mode))
-                                       ohshit(_("part file '%.250s' is not a 
plain file"),
+                                       ohshit(_("part file '%s' is not a plain 
file"),
                                               qq->info.filename);
                                bytes += stab.st_size;
 
@@ -375,7 +375,7 @@ discard_parts(struct partqueue *queue, enum discard_which 
which,
                }
 
                if (unlink(pq->info.filename))
-                       ohshite(_("unable to discard '%.250s'"),
+                       ohshite(_("unable to discard '%s'"),
                                pq->info.filename);
                printf(_("Deleted %s.\n"), pq->info.filename);
        }
diff --git a/src/split/split.c b/src/split/split.c
index 41816a7a9..df6e80e4b 100644
--- a/src/split/split.c
+++ b/src/split/split.c
@@ -100,9 +100,9 @@ parse_timestamp(const char *value)
        errno = 0;
        timestamp = strtoimax(value, &end, 10);
        if (value == end || *end)
-               ohshit(_("unable to parse timestamp '%.255s'"), value);
+               ohshit(_("unable to parse timestamp '%s'"), value);
        else if (errno != 0)
-               ohshite(_("unable to parse timestamp '%.255s'"), value);
+               ohshite(_("unable to parse timestamp '%s'"), value);
 
        return timestamp;
 }
@@ -128,11 +128,11 @@ mksplit(const char *file_src, const char *prefix, off_t 
maxpartsize)
 
        fd_src = open(file_src, O_RDONLY);
        if (fd_src < 0)
-               ohshite(_("unable to open source file '%.250s'"), file_src);
+               ohshite(_("unable to open source file '%s'"), file_src);
        if (fstat(fd_src, &st))
                ohshite(_("unable to fstat source file"));
        if (!S_ISREG(st.st_mode))
-               ohshit(_("source file '%.250s' not a plain file"), file_src);
+               ohshit(_("source file '%s' not a plain file"), file_src);
 
        if (fd_md5(fd_src, hash, -1, &err) < 0)
                ohshit(_("cannot compute MD5 digest for file '%s': %s"),
diff --git a/src/statoverride/main.c b/src/statoverride/main.c
index b2496b530..1c3097c19 100644
--- a/src/statoverride/main.c
+++ b/src/statoverride/main.c
@@ -176,10 +176,10 @@ statdb_node_apply(const char *filename, struct file_stat 
*filestat)
 
        rc = chown(filename, filestat->uid, filestat->gid);
        if (forcible_nonroot_error(rc) < 0)
-               ohshite(_("error setting ownership of '%.255s'"), filename);
+               ohshite(_("error setting ownership of '%s'"), filename);
        rc = chmod(filename, filestat->mode & ~S_IFMT);
        if (forcible_nonroot_error(rc) < 0)
-               ohshite(_("error setting permissions of '%.255s'"), filename);
+               ohshite(_("error setting permissions of '%s'"), filename);
 
        dpkg_selabel_load();
        dpkg_selabel_set_context(filename, filename, filestat->mode);
diff --git a/src/trigger/main.c b/src/trigger/main.c
index b3362fe48..a8203964b 100644
--- a/src/trigger/main.c
+++ b/src/trigger/main.c
@@ -184,13 +184,13 @@ do_trigger(const char *const *argv)
 
        badname = parse_awaiter_package();
        if (badname)
-               badusage(_("invalid awaited package name '%.250s': %.250s"),
+               badusage(_("invalid awaited package name '%s': %s"),
                         opt_bypackage, badname);
 
        activate = argv[0];
        badname = trig_name_is_invalid(activate);
        if (badname)
-               badusage(_("invalid trigger name '%.250s': %.250s"),
+               badusage(_("invalid trigger name '%s': %s"),
                         activate, badname);
 
        trigdef_set_methods(&tdm_add);
diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index 690f0ca1e..a628306cc 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -436,7 +436,7 @@ static void
 xrename(const char *src, const char *dst)
 {
        if (!rename_mv(src, dst))
-               syserr(_("unable to install '%.250s' as '%.250s'"), src, dst);
+               syserr(_("unable to install '%s' as '%s'"), src, dst);
 }
 
 static void LIBCOMPAT_ATTR_PRINTF(1)
@@ -628,7 +628,7 @@ fsys_xreadlink(const char *linkname)
 
        buf = fsys_areadlink(linkname);
        if (buf == NULL)
-               syserr(_("unable to read link '%s%.255s'"), instdir, linkname);
+               syserr(_("unable to read link '%s%s'"), instdir, linkname);
 
        return buf;
 }
@@ -675,7 +675,7 @@ fsys_symlink(const char *filename, const char *linkname)
                syserr(_("unable to remove '%s'"), root_linkname);
 
        if (symlink(filename, root_linkname))
-               syserr(_("error creating symbolic link '%.255s'"), 
root_linkname);
+               syserr(_("error creating symbolic link '%s'"), root_linkname);
 
        free(root_linkname);
 }
@@ -1319,7 +1319,7 @@ altdb_get_namelist(struct dirent ***table)
        count = scandir(admdir, table, altdb_filter_namelist, alphasort);
        if (count < 0) {
                if (errno != ENOENT)
-                       syserr(_("cannot scan directory '%.255s'"), admdir);
+                       syserr(_("cannot scan directory '%s'"), admdir);
                /* The directory does not exist, proceed anyway. */
                *table = NULL;
                count = 0;
@@ -2714,7 +2714,7 @@ alternative_set_selections(FILE *input, const char *desc)
                 * contain a space */
                res = fgets(line, sizeof(line), input);
                if (res == NULL && errno) {
-                       syserr(_("read error in %.250s"), desc);
+                       syserr(_("read error in %s"), desc);
                } else if (res == NULL) {
                        break;
                }

-- 
Dpkg.Org's dpkg

Reply via email to