head	1.2;
access;
symbols
	RELEASE_5_3_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2004.11.07.22.24.21;	author marcus;	state dead;
branches;
next	1.1;

1.1
date	2004.09.28.03.18.41;	author marcus;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Presenting GNOME 2.8 for FreeBSD (2.8.1 to be exact).

This release notes detailing all of the new goodies in GNOME 2.8 can
be found at http://www.gnome.org/start/2.8/notes/, and the list of what
was fixed in GNOME 2.8.1 can be found at
http://lists.gnome.org/archives/gnome-announce-list/2004-October/msg00056.html.

This release, as well as all of our others, would not have been possible
without the great efforts of our FreeBSD GNOME Team.  The list of
current members can be found at http://www.freebsd.org/gnome/contact.html
(including our newest member, Michael Johnson <ahze@@FreeBSD.org>).

Special thanks also goes out to all of the loyal FreeBSD GNOME users that
put up with crashes and hangs to test and debug GNOME on FreeBSD.  We would
especially like to thank those users that provided patches for GNOME 2.7 and
2.8:

Franz Klammer <klammer@@webonaut.com>
Piotr Smyrak <piotr.smyrak@@heron.pl>
Radek Kozlowski <radek@@raadradd.com>
Khairil Yusof <kaeru@@pd.jaring.my>
Yasuda Keisuke <kysd@@po.harenet.ne.jp>
Tom McLaughlin <tmclaugh@@sdf.lonestar.org>
Vladimir Grebenschikov <vova@@fbsd.ru>

GNOME 2.8 also features a new, FreeBSD-specific splashscreen that
was designed by jimmac for GNOME 2.8, then daemonized by
Franz Klammer <klammer@@webonaut.com> and Radek Kozlowski
<radek@@raadradd.com>.

As with GNOME 2.6, you cannot just "portupgrade" to GNOME 2.8.  There is
a script provided at http://www.marcuscom.com/downloads/gnome_upgrade28.sh
that will aid in the upgrade process.  Full documentation on the GNOME 2.8
upgrade is coming following this commit.

From all of us at FreeBSD GNOME, ENJOY!
@
text
@Index: mozilla/mailnews/local/src/nsPop3Protocol.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/local/src/nsPop3Protocol.cpp,v
retrieving revision 1.214.2.1
retrieving revision 1.214.2.1.2.1
diff -u -r1.214.2.1 -r1.214.2.1.2.1
--- mailnews/local/src/nsPop3Protocol.cpp	27 May 2004 14:54:03 -0000	1.214.2.1
+++ mailnews/local/src/nsPop3Protocol.cpp	27 Aug 2004 13:15:42 -0000	1.214.2.1.2.1
@@@@ -61,7 +61,6 @@@@
 #include "nsISignatureVerifier.h"
 
 #define EXTRA_SAFETY_SPACE 3096
-#define kLargeNumberOfMessages 50000
 
 static PRLogModuleInfo *POP3LOGMODULE = nsnull;
 
@@@@ -1791,11 +1790,11 @@@@
 
 
     m_pop3ConData->msg_info = (Pop3MsgInfo *) 
-      PR_CALLOC(sizeof(Pop3MsgInfo) *
-      (m_pop3ConData->number_of_messages < kLargeNumberOfMessages ? m_pop3ConData->number_of_messages : kLargeNumberOfMessages));
+      PR_CALLOC(sizeof(Pop3MsgInfo) * m_pop3ConData->number_of_messages);
     if (!m_pop3ConData->msg_info)
         return(MK_OUT_OF_MEMORY);
     m_pop3ConData->next_state_after_response = POP3_GET_LIST;
+    m_listpos = 0;
     return SendData(m_url, "LIST"CRLF);
 }
 
@@@@ -1837,6 +1836,9 @@@@
   */
   if(!PL_strcmp(line, "."))
   {
+    // limit the list if fewer entries than given in STAT response
+    if(m_listpos < m_pop3ConData->number_of_messages)
+      m_pop3ConData->number_of_messages = m_listpos;
     m_pop3ConData->next_state = POP3_SEND_UIDL_LIST;
     m_pop3ConData->pause_for_read = PR_FALSE;
     PR_Free(line);
@@@@ -1848,24 +1850,15 @@@@
   if (token)
   {
     msg_num = atol(token);
+    m_listpos++;
     
-    if(msg_num <= m_pop3ConData->number_of_messages && msg_num > 0)
+    if(m_listpos <= m_pop3ConData->number_of_messages && m_listpos > 0)
     {
       token = nsCRT::strtok(newStr, " ", &newStr);
       if (token)
-        m_pop3ConData->msg_info[msg_num-1].size = atol(token);
-      
-      if (msg_num >= kLargeNumberOfMessages && msg_num < m_pop3ConData->number_of_messages)
       {
-        m_pop3ConData->msg_info = (Pop3MsgInfo *)   //allocate space for next entry
-          PR_REALLOC(m_pop3ConData->msg_info, sizeof(Pop3MsgInfo) * (msg_num + 1));
-        if (!m_pop3ConData->msg_info)
-        {
-          m_pop3ConData->number_of_messages = msg_num; //so that we don't try to free not allocated entries!
-          return(MK_OUT_OF_MEMORY);
-        }
-        m_pop3ConData->msg_info[msg_num].size = 0; //initialize
-        m_pop3ConData->msg_info[msg_num].uidl = nsnull;
+        m_pop3ConData->msg_info[m_listpos-1].size = atol(token);
+        m_pop3ConData->msg_info[m_listpos-1].msgnum = msg_num;
       }
     }
   }
@@@@ -2101,6 +2094,7 @@@@
   {
     m_pop3ConData->next_state_after_response = POP3_GET_XTND_XLST_MSGID;
     m_pop3ConData->pause_for_read = PR_TRUE;
+    m_listpos = 0;
     return SendData(m_url, "XTND XLST Message-Id" CRLF);
   }
   else
@@@@ -2166,6 +2160,9 @@@@
   */
   if(!PL_strcmp(line, "."))
   {
+    // limit the list if fewer entries than given in STAT response
+    if(m_listpos < m_pop3ConData->number_of_messages)
+      m_pop3ConData->number_of_messages = m_listpos;
     m_pop3ConData->next_state = POP3_GET_MSG;
     m_pop3ConData->pause_for_read = PR_FALSE;
     PR_Free(line);
@@@@ -2177,7 +2174,9 @@@@
   if (token)
   {
     msg_num = atol(token);
-    if(msg_num <= m_pop3ConData->number_of_messages && msg_num > 0) 
+    m_listpos++;
+
+    if(m_listpos <= m_pop3ConData->number_of_messages && m_listpos > 0) 
     {
       /*	    char *eatMessageIdToken = nsCRT::strtok(newStr, " ", &newStr);	*/
       char *uidl = nsCRT::strtok(newStr, " ", &newStr);/* not really a uidl but a unique token -km */
@@@@ -2189,8 +2188,17 @@@@
       there, I have no idea; must be a server bug.  Or something. */
       uidl = "";
       
-      m_pop3ConData->msg_info[msg_num-1].uidl = PL_strdup(uidl);
-      if (!m_pop3ConData->msg_info[msg_num-1].uidl)
+      // seeking right entry, but try the one that should it be first
+      PRInt32 i;
+      if(m_pop3ConData->msg_info[m_listpos - 1].msgnum == msg_num)
+        i = m_listpos - 1;
+      else
+        for(i = 0; m_pop3ConData->msg_info[i].msgnum != msg_num &&
+                   i <= m_pop3ConData->number_of_messages; i++)
+          ;
+      
+      m_pop3ConData->msg_info[i].uidl = PL_strdup(uidl);
+      if (!m_pop3ConData->msg_info[i].uidl)
       {
         PR_Free(line);
         return MK_OUT_OF_MEMORY;
@@@@ -2209,6 +2217,7 @@@@
     {
         m_pop3ConData->next_state_after_response = POP3_GET_UIDL_LIST;
         m_pop3ConData->pause_for_read = PR_TRUE;
+        m_listpos = 0;
         return SendData(m_url,"UIDL" CRLF);
     }
     else
@@@@ -2264,6 +2273,9 @@@@
      */
     if(!PL_strcmp(line, "."))
 	{
+        // limit the list if fewer entries than given in STAT response
+        if(m_listpos < m_pop3ConData->number_of_messages)
+          m_pop3ConData->number_of_messages = m_listpos;
         m_pop3ConData->next_state = POP3_GET_MSG;
         m_pop3ConData->pause_for_read = PR_FALSE;
 	PR_Free(line);
@@@@ -2275,7 +2287,9 @@@@
     if (token)
     {
       msg_num = atol(token);
-      if(msg_num <= m_pop3ConData->number_of_messages && msg_num > 0) 
+      m_listpos++;
+
+      if(m_listpos <= m_pop3ConData->number_of_messages && m_listpos > 0) 
       {
         char *uidl = nsCRT::strtok(newStr, " ", &newStr);
 
@@@@ -2286,8 +2300,17 @@@@
                there, I have no idea; must be a server bug.  Or something. */
             uidl = "";
 
-        m_pop3ConData->msg_info[msg_num-1].uidl = PL_strdup(uidl);
-        if (!m_pop3ConData->msg_info[msg_num-1].uidl)
+        // seeking right entry, but try the one that should it be first
+        PRInt32 i;
+        if(m_pop3ConData->msg_info[m_listpos - 1].msgnum == msg_num)
+          i = m_listpos - 1;
+        else
+          for(i = 0; m_pop3ConData->msg_info[i].msgnum != msg_num &&
+                     i <= m_pop3ConData->number_of_messages; i++)
+            ;
+
+        m_pop3ConData->msg_info[i].uidl = PL_strdup(uidl);
+        if (!m_pop3ConData->msg_info[i].uidl)
         {
           PR_Free(line);
           return MK_OUT_OF_MEMORY;
@@@@ -2603,7 +2626,7 @@@@
 PRInt32 nsPop3Protocol::SendTop()
 {
    char * cmd = PR_smprintf( "TOP %ld 20" CRLF,
-     m_pop3ConData->last_accessed_msg+1);
+     m_pop3ConData->msg_info[m_pop3ConData->last_accessed_msg].msgnum);
    PRInt32 status = -1;
    if (cmd)
    {
@@@@ -2624,7 +2647,7 @@@@
  */
 PRInt32 nsPop3Protocol::SendXsender()
 {
-  char * cmd = PR_smprintf("XSENDER %ld" CRLF, m_pop3ConData->last_accessed_msg+1);
+  char * cmd = PR_smprintf("XSENDER %ld" CRLF, m_pop3ConData->msg_info[m_pop3ConData->last_accessed_msg].msgnum);
   PRInt32 status = -1;
   if (cmd)
   {  
@@@@ -2662,7 +2685,7 @@@@
 nsPop3Protocol::SendRetr()
 {
   
-  char * cmd = PR_smprintf("RETR %ld" CRLF, m_pop3ConData->last_accessed_msg+1);
+  char * cmd = PR_smprintf("RETR %ld" CRLF, m_pop3ConData->msg_info[m_pop3ConData->last_accessed_msg].msgnum);
   PRInt32 status = -1;
   if (cmd)
   {
@@@@ -3071,8 +3094,8 @@@@
 {
     /* increment the last accessed message since we have now read it
      */
+    char * cmd = PR_smprintf("DELE %ld" CRLF, m_pop3ConData->msg_info[m_pop3ConData->last_accessed_msg].msgnum);
     m_pop3ConData->last_accessed_msg++;
-    char * cmd = PR_smprintf("DELE %ld" CRLF, m_pop3ConData->last_accessed_msg);
 	PRInt32 status = -1;
 	if (cmd)
 	{
Index: mozilla/mailnews/local/src/nsPop3Protocol.h
===================================================================
RCS file: /cvsroot/mozilla/mailnews/local/src/nsPop3Protocol.h,v
retrieving revision 1.63
retrieving revision 1.63.10.1
diff -u -r1.63 -r1.63.10.1
--- mailnews/local/src/nsPop3Protocol.h	8 Mar 2004 19:50:30 -0000	1.63
+++ mailnews/local/src/nsPop3Protocol.h	27 Aug 2004 13:15:42 -0000	1.63.10.1
@@@@ -191,6 +191,7 @@@@
 } Pop3UidlHost;
 
 typedef struct Pop3MsgInfo {
+    PRInt32 msgnum;
     PRInt32 size;
     char* uidl;
 } Pop3MsgInfo;
@@@@ -350,6 +351,7 @@@@
   void BackupAuthFlags();
   void RestoreAuthFlags();
   PRInt32 m_origAuthFlags;
+  PRInt32 m_listpos;
 
   //////////////////////////////////////////////////////////////////////////////////////////
       // Begin Pop3 protocol state handlers
@


1.1
log
@Patch the various recently reported security vulnerabilities in Mozilla.
This is being done instead of the update to 1.7.3 since the update breaks
all dependent ports, and that many changes is not a good thing to do during
a freeze.

This update covers the following Mozilla bugs:

245066
226669
250862
255067
256316
257317
258005

Thanks to nectar for scraping all of these patches together.

Obtained from:	Mozilla CVS
Approved by:	portmgr (implicit)
@
text
@@

