|
From: <iea...@us...> - 2010-02-26 14:42:50
|
Revision: 752
http://seq.svn.sourceforge.net/seq/?rev=752&view=rev
Author: ieatacid
Date: 2010-02-26 14:42:42 +0000 (Fri, 26 Feb 2010)
Log Message:
-----------
Adjusted makeDropStruct.idFile size to 30 to fix a crash
+ Sanity check for idFile string length in newGroundItem function
+ Removed unused members of makeDropStruct
Modified Paths:
--------------
showeq/trunk/ChangeLog
showeq/trunk/configure.in
showeq/trunk/src/everquest.h
showeq/trunk/src/spawnshell.cpp
Modified: showeq/trunk/ChangeLog
===================================================================
--- showeq/trunk/ChangeLog 2010-02-20 23:04:38 UTC (rev 751)
+++ showeq/trunk/ChangeLog 2010-02-26 14:42:42 UTC (rev 752)
@@ -1,3 +1,10 @@
+ieatacid (2/26/90)
+-----------------
+- Updated version to 5.13.10.1
+- Adjusted makeDropStruct.idFile size to 30 bytes which should fix an associated crash
+- Added sanity check for makeDropStruct.idFile string length in newGroundItem function
+- Removed unused members from makeDropStruct in everquest.h
+
ieatacid (2/20/09)
-----------------
- Updated version to 5.13.10
Modified: showeq/trunk/configure.in
===================================================================
--- showeq/trunk/configure.in 2010-02-20 23:04:38 UTC (rev 751)
+++ showeq/trunk/configure.in 2010-02-26 14:42:42 UTC (rev 752)
@@ -2,7 +2,7 @@
dnl $Id$ $Name$
AC_PREREQ(2.59)
-AC_INIT(showeq, 5.13.10.0)
+AC_INIT(showeq, 5.13.10.1)
AC_CONFIG_SRCDIR(src/main.cpp)
AC_CANONICAL_SYSTEM
Modified: showeq/trunk/src/everquest.h
===================================================================
--- showeq/trunk/src/everquest.h 2010-02-20 23:04:38 UTC (rev 751)
+++ showeq/trunk/src/everquest.h 2010-02-26 14:42:42 UTC (rev 752)
@@ -1309,29 +1309,20 @@
/*
** Drop Item On Ground
-** Length: 104 Octets
+** Length: Variable
** OpCode: MakeDropCode
*/
+// Note: Unknowns and other members removed that we don't use since we
+// now only fill this with data we need from the serialized packet
struct makeDropStruct
{
-/*0000*/ uint32_t prevObject; // Previous object in the linked list
-/*0004*/ uint32_t nextObject; // Next object in the linked list
-/*0008*/ uint32_t unknown0008; // ***Placeholder
-/*0012*/ uint32_t dropId; // DropID
-/*0016*/ uint16_t zoneId; // ZoneID
-/*0018*/ uint16_t zoneInstance; // Zone instance id
-/*0020*/ uint8_t unknown0020[8]; // ***Placeholder
-/*0028*/ uint8_t unknown0028[12]; // ***Placeholder (9/23/2006)
-/*0040*/ float heading; // Heading
-/*0044*/ float z; // Z Position
-/*0048*/ float x; // X Position
-/*0052*/ float y; // Y Position
-/*0056*/ char idFile[16]; // ACTOR ID
-/*0072*/ uint32_t unknown0072[5]; // ***Placeholder
-/*0092*/ uint32_t dropType; // drop type
-/*0096*/ uint32_t unknown0096; // ***Placeholder
-/*0100*/ uint32_t userSpawnID; // spawn id of the person using
-/*0104*/
+ uint32_t dropId; // DropID
+ float heading; // Heading
+ float z; // Z Position
+ float x; // X Position
+ float y; // Y Position
+ char idFile[30]; // ACTOR ID - The client reads 30 bytes from the packet
+ // - 20100210 eqgame.exe in EQItemList::UnpackNetData
};
/*
Modified: showeq/trunk/src/spawnshell.cpp
===================================================================
--- showeq/trunk/src/spawnshell.cpp 2010-02-20 23:04:38 UTC (rev 751)
+++ showeq/trunk/src/spawnshell.cpp 2010-02-26 14:42:42 UTC (rev 752)
@@ -336,13 +336,17 @@
makeDropStruct ds;
QString name;
union { uint32_t n; float f; } x;
+ memset(&ds, 0, sizeof(makeDropStruct));
// read drop id
ds.dropId = netStream.readUInt32NC();
// read name
name = netStream.readText();
- strcpy(ds.idFile, name.latin1());
+ if(name.length())
+ {
+ strcpy(ds.idFile, name.latin1());
+ }
// read past zone id
netStream.readUInt32NC();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|