#garfield Logs
Nov 12 2017
#garfield Calendar
01:09 PM rue_mohr: pad?
01:44 PM Tom_L: one of the screw drive mounts
01:45 PM Tom_L: err something..
08:32 PM __m00n__: int main(int chocolate, char *argv[]) {
08:32 PM __m00n__:
08:32 PM __m00n__: char one[50];
08:32 PM __m00n__: strcpy(one, getwd());
08:32 PM __m00n__: strcpy(one, argv[0]);
08:32 PM __m00n__: puts(*one);
08:32 PM __m00n__: return 0;
08:32 PM __m00n__: }
08:32 PM __m00n__: why segfault?
08:39 PM rue_shop3: ah
08:39 PM rue_shop3: no
08:40 PM rue_shop3: the orig has to exist
08:40 PM __m00n__: ??
08:40 PM rue_shop3: this->count++;
08:40 PM rue_shop3: this->labels = realloc(this->labels, sizeof(char*) * ((this->count) + 1) );
08:40 PM rue_shop3: this->labels[this->count] = strdup(string);
08:40 PM __m00n__: WUUUT
08:40 PM rue_shop3: let me think
08:41 PM rue_shop3: what are you trying to do?
08:41 PM __m00n__: i want a string with my full execution path
08:41 PM __m00n__: /home/moon/POP
08:42 PM rue_shop3: did the compiler give you a warning?
08:42 PM __m00n__: yeah
08:42 PM __m00n__: stuffing an int into somewher without type casting
08:43 PM rue_shop3: 1 mmin
08:43 PM rue_shop3: char *getwd(char *buf);
08:44 PM rue_shop3: dosn't create the string
08:44 PM rue_shop3: getwd(one);
08:44 PM __m00n__: k i try
08:46 PM __m00n__: still seg fault
08:46 PM rue_shop3: test.c:(.text+0x1c): warning: the `getwd' function is dangerous and should not be used.
08:46 PM rue_shop3: :)
08:46 PM __m00n__: ;)
08:46 PM rue_shop3: then you did it wrong
08:46 PM rue_shop3: hold on
08:47 PM rue_shop3: https://paste.debian.net/995408/
08:47 PM rue_shop3: 8-|
08:48 PM __m00n__: looking
08:49 PM rue_shop3: root@blackie2:/tmp# ./a.out
08:49 PM rue_shop3: /tmp./a.out
08:49 PM __m00n__: looking good
08:49 PM __m00n__: thanks
08:49 PM rue_shop3: stop tying to create memory overflow exploits
08:49 PM rue_shop3: 50
08:49 PM rue_shop3: computer has 2G of ram, and he allocates 50 chars...
08:49 PM __m00n__: XD
08:50 PM __m00n__: actually you love this one
08:50 PM __m00n__: its a window that forks and opens itself when you try to close it
08:50 PM rue_shop3: oldschool
08:51 PM rue_shop3: be creative, start two, set a random timer on the second one comming up
08:51 PM __m00n__: :O
08:51 PM __m00n__: good idea
08:51 PM rue_shop3: whaaatever...
08:52 PM __m00n__: peace
08:53 PM rue_shop3: s
08:53 PM rue_shop3: (rease)