Re: [PATCH v2 04/10] eal: fix plugin dir walk

2025-07-03 Thread David Marchand
On Wed, Jun 25, 2025 at 10:43 AM Marat Khalili wrote: > > Thank you for doing this. > > > +static bool > > +ends_with(const char *str, size_t str_len, const char *tail) > > I too think we should have a general ends_with, I for one had to code one > just this week. However, I do not think it shoul

RE: [PATCH v2 04/10] eal: fix plugin dir walk

2025-06-25 Thread Marat Khalili
Thank you for doing this. > +static bool > +ends_with(const char *str, size_t str_len, const char *tail) I too think we should have a general ends_with, I for one had to code one just this week. However, I do not think it should support non-null-terminated strings. > +{ > + size_t tail_len

[PATCH v2 04/10] eal: fix plugin dir walk

2025-06-23 Thread David Marchand
For '.' and '..' directories (or any short file name), a out of bound issue occurs. Caught by UBSan: EAL: Detected shared linkage of DPDK ../lib/eal/common/eal_common_options.c:420:15: runtime error: index -2 out of bounds for type 'char[256]' #0 0x7f867eedf206 in eal_plugindir_init