Results 1 to 5 of 5

Thread: Oops... you're walking over your memory

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    32

    Lightbulb Oops... you're walking over your memory

    That'll teach you to use literals

    Also my compiler complains unless winsock32.h is included before stdio.h.


    *** /cygdrive/c/Program Files/MySEQ/myseqserverc/myseqserverc.cpp Thu Apr 17 02:31:00 2003
    --- myseqserverc.cpp Thu Apr 17 15:20:34 2003
    ***************
    *** 1,10 ****
    // myseqserverc.cpp : Defines the entry point for the console application.
    //

    #include <stdio.h>
    #include <stdlib.h>
    //#include <winsock.h>
    - #include <winsock2.h>
    #include <windows.h>
    #include <time.h>
    #include <sys/types.h>
    --- 1,10 ----
    // myseqserverc.cpp : Defines the entry point for the console application.
    //

    + #include <winsock2.h>
    #include <stdio.h>
    #include <stdlib.h>
    //#include <winsock.h>
    #include <windows.h>
    #include <time.h>
    #include <sys/types.h>
    ***************
    *** 390,396 ****
    }

    if (si.pNext != 0) {
    ! ReadProcessMemory(eqprocess, addr, &si, 364, &tmp);

    }
    else {
    --- 390,396 ----
    }

    if (si.pNext != 0) {
    ! ReadProcessMemory(eqprocess, addr, &si, sizeof(si)-4, &tmp);

    }
    else {


  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    69
    line 385 contains the same error...

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    32
    Think we may be working off different sources. I'm using 1.5b.

  4. #4
    Registered User MrDoh's Avatar
    Join Date
    Apr 2003
    Posts
    60
    I'm not really a programer, but I'm trying to learn more and more, and I don't understand this post.

    Could someone point a little better at whats wrong, and what was changed to make it right, and mabe explain just a little more. Maybe something I can learn now so I avoid the problem in the future.

    Thanks,
    Mr. Doh

  5. #5
    Moderator
    Join Date
    Jan 2003
    Posts
    426
    I'll switch the winsock2.h, never seen that one before.

    The 364 is already fixed, I hate it when stuff like that slips through...

    Oh and it was wrong because if the data structure size changes, that ReadMemoryProcess will be at best reading not enough data and at worst reading too much.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is On