]> git.ipfire.org Git - thirdparty/systemd.git/commit
string-util: check for overflow in strrep() 41661/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 16 Apr 2026 09:59:36 +0000 (11:59 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 16 Apr 2026 15:46:31 +0000 (17:46 +0200)
commitb22daa97e1608d865ce76ed72fd6b7bd59ccbf70
tree636ae460295a6c77d048b48db05e0fcfea213db1
parent4efb5d389c9653e3a61e583c64dc3d094eb8911e
string-util: check for overflow in strrep()

This simply mirrors the same overflow check we already have in
strrepa(), in case someone passed us a sufficiently long string.

strrep() is currently used only in tests, so this is just hardening.
src/basic/string-util.c
src/basic/string-util.h
src/test/test-string-util.c