~thopiekar/pacman-pm/pacman

Viewing all changes in revision 5601.

  • Committer: Allan McRae
  • Author(s): László Várady
  • Date: 2019-08-12 00:19:09 UTC
  • Revision ID: git-v1:f9f22fded2f05ae1edb5af3bd0e3a4aba2f5ce34
pacman/callback: fix buffer over-read

Commit 11ab9aa9f5f0f3873df89c73e8715b82f485bd9b replaced a strcpy() call
with memcpy(), without copying the terminating null character.

Since fname is allocated with malloc(), subsequent strstr() calls will
overrun the buffer's boundary.

Signed-off-by: László Várady <laszlo.varady93@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: