[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Review Request: Fix to game of life applet to avoid accessing memory
From:       the.goofeedude () gmail ! com
Date:       2010-06-17 1:07:39
Message-ID: 20100617010739.21491.86952 () localhost
[Download RAW message or body]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4361/
-----------------------------------------------------------

Review request for Plasma.


Summary
-------

This patch fixes an off-by-one error which led to accessing memory just outside of \
the cells array. It also kept the first character in the cells array from ever being \
displayed on the board properly, and a bunch of crazy math to keep the rules of the \
game intact. (The last cell displayed was reflecting the state of memory outside of \
the cells array.)


Diffs
-----

  /trunk/KDE/kdeplasma-addons/applets/life/life.h 1138038 
  /trunk/KDE/kdeplasma-addons/applets/life/life.cpp 1138038 

Diff: http://reviewboard.kde.org/r/4361/diff


Testing
-------

Aside from the initial test cases which were used to confirm the bug (hard coding one \
char in the cells array to always be 1 and moving it around to find the bounds of the \
display,) I also generated a few other board states manually using examples found \
here: http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life

"Blinker" and "Toad" were two that were used to test.


Thanks,

obby

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic