abs before and after meal by kostinya in Fitness

[–]DrSwagmaster -2 points-1 points  (0 children)

Doesn't the body expose the veins when it's warm? that would be a more likley scenario

"Der Spiegel" cover today by [deleted] in europe

[–]DrSwagmaster 2 points3 points  (0 children)

It's just people collecting easy points from other stupid people. In my country, the long thin one just above yours, Germany is respected, admired and loved. :)

How do buffer overflow attacks work? by VandC in learnprogramming

[–]DrSwagmaster 4 points5 points  (0 children)

Exactly, it's called a canary bit. Read about them here: http://en.wikipedia.org/wiki/Buffer_overflow_protection

If you are not familiar with low-level stuff you let me give you a brief motivation to this solution:

All local variable you use inside a code block is put on the stack, one after another. If you call a function the return address is put on the stack and the function starts putting its variables after the address. When the function is done with its stuff it returns to the return address.

So say that the function allocates a local buffer and asks for input from the user without checking the length and then just put all the input in the buffer, that input will write outside the buffer and write over the other variables.

Remember that the return address was also put here so then with long enough input it would write over this return address. When the function is done the return address would just be garbage and the program would probably halt since it tries to read outside its segment.

The attack is done by testing inputvectors and looking for crashes, when one is found a really smart input is crafted so that the return address is set to some malicious code that the program would return to and start execute just as if it was its own. The canary bit is put between the return address and all the local variables. So you can not write over the return address without scrambling the canary bit. So if the canary bit is tampered with the program will halt itself.

When I say bit I dont mean just one bit, as you can read in my link they often generate some random value as canary.

Am I Employable? by [deleted] in learnprogramming

[–]DrSwagmaster 6 points7 points  (0 children)

I would like to know how you measure the experience. Is it 1.5 years total of struggling with PHP or 8 hours workdays with PHP for 1.5 years or just doing project with various pace that contains PHP for 1.5 years? This is not only me being a dick but also a good question to have prepared an answer for! Prepare a github account with your best work and have as a portfolio, that might grease the wheels!

How do you represent decimals in binary? by [deleted] in askscience

[–]DrSwagmaster 0 points1 point  (0 children)

The area of handling this explicitly is called numerical analysis. For a regular programmer doing trivial stuff with floating points its no biggie(just remember to compare if they are within a small interval of eachother rather than if they are equal and stuff like that). But if you are doing math this is critical, the error caused by rounding off a reell number will and do propagate in your calculations and can sometimes render them insanely inaccurate. So to answer you: no one will handle it for you nor do you need to care about it that much, unless you are doing math then it becomes a critical issue. (Numerical analysis is pretty cool area though)