Re: [Exim] Posible bug in check_dir_size

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: exim-users
CC: Justo Alonso
題目: Re: [Exim] Posible bug in check_dir_size
On Tue, 15 Apr 2003, I wrote:

> I can reproduce this in 4.14, so it is a bug. I will fix it as soon as
> possible, and post a patch.


The patch is below.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.





*** exim-4.14/src/transports/appendfile.c   Tue Mar 11 12:20:23 2003
--- transports/appendfile.c    Tue Apr 15 11:10:52 2003
***************
*** 702,708 ****
      if (pcre_exec(regex, NULL, CS name, Ustrlen(name), 0, 0, ovector,6) >= 2)
        {
        int size;
!       Ustrncpy(buffer, name + ovector[2], ovector[3] - ovector[2]);
        size = Uatoi(buffer);
        sum += size;
        DEBUG(D_transport)
--- 702,710 ----
      if (pcre_exec(regex, NULL, CS name, Ustrlen(name), 0, 0, ovector,6) >= 2)
        {
        int size;
!       int n = ovector[3] - ovector[2];
!       Ustrncpy(buffer, name + ovector[2], n);
!       buffer[n] = 0;
        size = Uatoi(buffer);
        sum += size;
        DEBUG(D_transport)