[SVN] r535 - in /trunk/cyrus-imapd-2.2.13/debian/patches:
0018-upstream-ntohl-instead-of-htonl.dpatch 00list
debian at incase.de
debian at incase.de
Sun Aug 6 18:05:03 UTC 2006
Author: sven
Date: Sun Aug 6 20:05:02 2006
New Revision: 535
URL: https://mail.incase.de/viewcvs?rev=535&root=cyrus22&view=rev
Log:
Add upstream patch: use ntohl() instead of htonl() in mailbox_read_index_record()
Added:
trunk/cyrus-imapd-2.2.13/debian/patches/0018-upstream-ntohl-instead-of-htonl.dpatch (with props)
Modified:
trunk/cyrus-imapd-2.2.13/debian/patches/00list
Added: trunk/cyrus-imapd-2.2.13/debian/patches/0018-upstream-ntohl-instead-of-htonl.dpatch
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/patches/0018-upstream-ntohl-instead-of-htonl.dpatch?rev=535&root=cyrus22&view=auto
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/patches/0018-upstream-ntohl-instead-of-htonl.dpatch (added)
+++ trunk/cyrus-imapd-2.2.13/debian/patches/0018-upstream-ntohl-instead-of-htonl.dpatch Sun Aug 6 20:05:02 2006
@@ -1,0 +1,50 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0018-upstream-ntohl-instead-of-htonl by murch at andrew.cmu.edu
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: use ntohl() instead of htonl() in mailbox_read_index_record()
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/mailbox.c /tmp/dpep.20jd7v/cyrus-imapd-2.2.13/imap/mailbox.c
+--- cyrus-imapd-2.2.13/imap/mailbox.c 2006-08-06 20:03:02.000000000 +0200
++++ /tmp/dpep.20jd7v/cyrus-imapd-2.2.13/imap/mailbox.c 2006-08-06 20:03:13.168502599 +0200
+@@ -1,5 +1,5 @@
+ /* mailbox.c -- Mailbox manipulation routines
+- * $Id: mailbox.c,v 1.161 2006/06/02 18:56:52 murch Exp $
++ * $Id: mailbox.c,v 1.162 2006/08/04 14:40:54 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+@@ -884,20 +884,20 @@
+
+ buf = (unsigned char*) mailbox->index_base + offset;
+
+- record->uid = htonl(*((bit32 *)(buf+OFFSET_UID)));
+- record->internaldate = htonl(*((bit32 *)(buf+OFFSET_INTERNALDATE)));
+- record->sentdate = htonl(*((bit32 *)(buf+OFFSET_SENTDATE)));
+- record->size = htonl(*((bit32 *)(buf+OFFSET_SIZE)));
+- record->header_size = htonl(*((bit32 *)(buf+OFFSET_HEADER_SIZE)));
+- record->content_offset = htonl(*((bit32 *)(buf+OFFSET_CONTENT_OFFSET)));
+- record->cache_offset = htonl(*((bit32 *)(buf+OFFSET_CACHE_OFFSET)));
+- record->last_updated = htonl(*((bit32 *)(buf+OFFSET_LAST_UPDATED)));
+- record->system_flags = htonl(*((bit32 *)(buf+OFFSET_SYSTEM_FLAGS)));
++ record->uid = ntohl(*((bit32 *)(buf+OFFSET_UID)));
++ record->internaldate = ntohl(*((bit32 *)(buf+OFFSET_INTERNALDATE)));
++ record->sentdate = ntohl(*((bit32 *)(buf+OFFSET_SENTDATE)));
++ record->size = ntohl(*((bit32 *)(buf+OFFSET_SIZE)));
++ record->header_size = ntohl(*((bit32 *)(buf+OFFSET_HEADER_SIZE)));
++ record->content_offset = ntohl(*((bit32 *)(buf+OFFSET_CONTENT_OFFSET)));
++ record->cache_offset = ntohl(*((bit32 *)(buf+OFFSET_CACHE_OFFSET)));
++ record->last_updated = ntohl(*((bit32 *)(buf+OFFSET_LAST_UPDATED)));
++ record->system_flags = ntohl(*((bit32 *)(buf+OFFSET_SYSTEM_FLAGS)));
+ for (n = 0; n < MAX_USER_FLAGS/32; n++) {
+- record->user_flags[n] = htonl(*((bit32 *)(buf+OFFSET_USER_FLAGS+4*n)));
++ record->user_flags[n] = ntohl(*((bit32 *)(buf+OFFSET_USER_FLAGS+4*n)));
+ }
+- record->content_lines = htonl(*((bit32 *)(buf+OFFSET_CONTENT_LINES)));
+- record->cache_version = htonl(*((bit32 *)(buf+OFFSET_CACHE_VERSION)));
++ record->content_lines = ntohl(*((bit32 *)(buf+OFFSET_CONTENT_LINES)));
++ record->cache_version = ntohl(*((bit32 *)(buf+OFFSET_CACHE_VERSION)));
+ return 0;
+ }
+
Propchange: trunk/cyrus-imapd-2.2.13/debian/patches/0018-upstream-ntohl-instead-of-htonl.dpatch
------------------------------------------------------------------------------
svn:executable = *
Modified: trunk/cyrus-imapd-2.2.13/debian/patches/00list
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/patches/00list?rev=535&root=cyrus22&r1=534&r2=535&view=diff
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/patches/00list (original)
+++ trunk/cyrus-imapd-2.2.13/debian/patches/00list Sun Aug 6 20:05:02 2006
@@ -15,6 +15,7 @@
0015-upstream-fix-logic-error-in-imapoptions.dpatch
0016-upstream-fix-typos.dpatch
0017-upstream-no-body-empty-string-instead-of-null.dpatch
+0018-upstream-ntohl-instead-of-htonl.dpatch
0090-fix-casts.dpatch
01-fix_Makefile.in.dpatch
02-add_mkinstalldirs.dpatch
More information about the Pkg-Cyrus-imapd-Debian-devel
mailing list