Ticket #203 (closed defect: fixed)

Opened 2 months ago

Last modified 8 weeks ago

filter_env thinks functionfoo is foo

Reported by: ferdy Owned by:
Priority: normal Milestone: 0.4.7.3
Component: pkgcore Version: 0.4.7.4
Keywords: Cc:

Description

09:15 < ferdy> ferringb: you might want to apply: http://rafb.net/p/IhrT5n55.html . Otherwise it treats 'functionfoo' as 'foo'.
11:41 < ferringb> ferdy: doesn't work with function\nfoo
11:41 < ferringb> ferdy: or function\tfoo # a more likely example
11:41 < ferringb> ferdy: nice catch though
11:42 < ferringb> ferdy: question is, what ebuild?
11:43 < ferdy> no ebuild. Spotted it while reading through the code

That paste has (even if it is not correct, just as a reference):

=== modified file 'src/filter_env.c'
--- src/filter_env.c	2008-06-11 03:01:16 +0000
+++ src/filter_env.c	2008-06-23 07:10:51 +0000
@@ -68,9 +68,9 @@
 {
     #define SKIP_SPACES(p) while('\0' != *(p) && \
         (' ' == *(p) || '\t' == *(p))) ++p;
-    #define FUNC_LEN 8
+    #define FUNC_LEN 9
     SKIP_SPACES(p);
-    if(strncmp(p, "function", FUNC_LEN) == 0)
+    if(strncmp(p, "function ", FUNC_LEN) == 0)
         p += FUNC_LEN;
     while('\0' != *p && isspace(*p))
         ++p;

- ferdy

Change History

Changed 2 months ago by masterdriverz

  • summary changed from filter_env.c thinks functionfoo is foo to filter_env thinks functionfoo is foo

Looks like the purepy code has this problem too...

Changed 8 weeks ago by ferringb

  • status changed from new to closed
  • resolution set to fixed

via rev 3499 of my branch, fixed. Will hit integration shortly.

Note: See TracTickets for help on using tickets.