Re: What's cooking in git.git (Dec 2019, #04; Tue, 17)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 17, 2019 at 2:03 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:

> * en/fill-directory-fixes (2019-12-11) 8 commits
>  - dir: consolidate similar code in treat_directory()
>  - dir: synchronize treat_leading_path() and read_directory_recursive()
>  - dir: fix checks on common prefix directory
>  - dir: break part of read_directory_recursive() out for reuse
>  - dir: exit before wildcard fall-through if there is no wildcard
>  - dir: remove stray quote character in comment
>  - Revert "dir.c: make 'git-status --ignored' work within leading directories"
>  - t3011: demonstrate directory traversal failures
>
>  Assorted fixes to the directory traversal API.
>
>  Will merge to 'next'.

Please hold; even if you are willing to accept a manufactured dirent,
the discussion did highlight two bugs in this series:

1) I shouldn't assume dirent has a d_type member; my one access to it
should be guarded with a !defined(NO_D_TYPE_IN_DIRENT).

2) I should allocate my dirent on the heap (with some extra buffer
space) rather than the stack, because if dirent has a "char d_name[]"
rather than a "char d_name[BIG_ENOUGH]" declaration, then my
stack-based allocation followed by writing to d_name will smash the
stack.

I'll submit a re-roll with those two things fixed.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux