[exim-dev] [Bug 2458] New: 4.93rc0 - invalid prototypes in …

Page principale
Supprimer ce message
Répondre à ce message
Auteur: admin
Date:  
À: exim-dev
Sujet: [exim-dev] [Bug 2458] New: 4.93rc0 - invalid prototypes in local_scan.h
https://bugs.exim.org/show_bug.cgi?id=2458

            Bug ID: 2458
           Summary: 4.93rc0 - invalid prototypes in local_scan.h
           Product: Exim
           Version: N/A
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Unfiled
          Assignee: unallocated@???
          Reporter: eximusers@???
                CC: exim-dev@???


Created attachment 1227
--> https://bugs.exim.org/attachment.cgi?id=1227&action=edit
Trivial test case for bug

Hello,

local_scan.h in rc0 has incorrect prototypes/defines, after appying
trivial_testcase_local_scan.diff (will attach) we find the following errors:
------------------
In file included from ../src/local_scan.c:29:
../src/local_scan.c: In function 'local_scan':
../src/local_scan.h:202:29: error: too many arguments to function
'string_copyn_function'
  202 | # define string_copyn(s, n) string_copyn_function((s), (n))
      |                             ^~~~~~~~~~~~~~~~~~~~~
../src/local_scan.c:68:10: note: in expansion of macro 'string_copyn'
   68 |  dest2 = string_copyn(blah, 4);
      |          ^~~~~~~~~~~~
../src/local_scan.h:206:17: note: declared here
  206 | extern uschar * string_copyn_function(const uschar *);
      |                 ^~~~~~~~~~~~~~~~~~~~~
../src/local_scan.h:203:34: error: too many arguments to function
'string_copy_taint_function'
  203 | # define string_copy_taint(s, t) string_copy_taint_function((s), (t))
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/local_scan.c:69:10: note: in expansion of macro 'string_copy_taint'
   69 |  dest1 = string_copy_taint(blah, 0);
      |          ^~~~~~~~~~~~~~~~~
../src/local_scan.h:207:17: note: declared here
  207 | extern uschar * string_copy_taint_function(const uschar *);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/local_scan.h:193:64: error: expected expression before ')' token
  193 |  string_sprintf_trc(fmt, US __FUNCTION__, __LINE__, __VA_ARGS__)
      |                                                                ^
../src/local_scan.c:70:2: note: in expansion of macro 'string_sprintf'
   70 |  string_sprintf("blah\n");
      |  ^~~~~~~~~~~~~~
make[3]: *** [Makefile:898: local_scan.o] Error 1
-----------------------------------


string_copyn() is lacking the length argument and string_copy_taint_function
lacks the BOOL tainted argument.

string_sprintf now fails if just a single argument is given.

I also think that making string_ #defines instead of functions is reason for
bumping LOCAL_SCAN_ABI_VERSION_MINOR.

cu Andreas

--
You are receiving this mail because:
You are on the CC list for the bug.