]> git.ipfire.org Git - thirdparty/cups-filters.git/commit
foomatic-rip: use bounds-safe string writes (#697) (#707) master
authorAayush Kumar <166936037+AayushKumar26@users.noreply.github.com>
Tue, 21 Jul 2026 21:15:22 +0000 (02:45 +0530)
committerGitHub <noreply@github.com>
Tue, 21 Jul 2026 21:15:22 +0000 (23:15 +0200)
commit11d1a190530f85a361a1b3835f57d635256dff1a
tree63ec14f276909585c16b4cde6fa47787640cb6e5
parentb0377e7a6ff8889ea5696a25407bd82c7dca718f
foomatic-rip: use bounds-safe string writes (#697) (#707)

Replace the strcpy/sprintf calls CodeQL flagged as unbounded writes with
bounded equivalents: strlcpy for opt->varname, snprintf for the command
fragment, and memcpy(srclen+1) in dstrcpy(). Behaviour is unchanged - the
destinations were already sized correctly - but the bounds are now
explicit.

Addresses #697
filter/foomatic-rip/options.c
filter/foomatic-rip/util.c