This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Andreas Jaeger <aj@suse.de> writes: |> + buf_ptr = stpncpy (buf_ptr, entry->path, sizeof (buf) - (buf_ptr - buf)); |> + /* Check for overflow. */ |> + if ((buf_ptr - buf) >= sizeof (buf)) |> + { |> + if (use_chroot) |> + error (0, 0, _("Length of directory %s%s is too large -- directory is ignored\n"), |> + opt_chroot, entry->path); |> + else |> + error (0, 0, _("Length of directory %s is too large -- directory is ignored\n"), |> + entry->path); |> + return; |> + } Arbitrary limits are bad. Could you please make buf dynamically allocated? Andreas. -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |