The Official Status Thread
-
I suppose I should mention ours was small for a tractor, before you guys start thinking of those 20-foot tall sprayers and such.
-
Cheap local knockoff of... something or other, CBA to research. Mostly worked fine, other than the clutch which was an abomination unto mankind and should only be wished upon those you hate.
-
That's about the same size. This one was ours IIRC, though we didn't have the 4wd model
-
sprintf_s and strcpy_s are the offenders. I rewrote them to sprintf and strcpy (yay adding buffer overflow vulnerabilities in order to support Linux!!) and I guess someone reverted all the changes.
Those are MS-isms introduced because MS broke
snprintf
and doesn't supportstrlcpy
...(which is the proper Linux version ofstrcpy_s
)Although it does indeed appear that C11 adopted the MS naming convention to troll Microsoft. ;)
-
Status: Winter Wyvern
Her voice is pretty coolpunnotintended)
WTF is up with the scaling on these sups?
-
Is the site supposed to be in half russian half english?
-
Those are MS-isms introduced because MS broke snprintf and doesn't support strlcpy...(which is the proper Linux version of strcpy_s)
Eh...isn't that the BSD version? Not that it isn't a more useful version than strncpy.
Why'd it get windy all of the sudden?
-
At least that's what my wife tells me while she's chasing me with the iron skillet.
So it's hilarious as long as it's the husband being abused?
Filed under: this thread is sexist, if I'm a member of the patriarchy, why do I have a boring dead-end DBA job?
-
(which is the proper Linux version of strcpy_s)
I've actually come around to thinking thestrcpy_s
behavior is better. Here is what LWN.net has to say aboutstrlcpy
and why it's not included in glibc (as @boomzilla points out, it's more of a BSDism):The essence of the argument against strlcpy() is that it fixes one problem—sometimes failing to terminate dst in the case of strncpy(), buffer overruns in the case of strcpy()—while leaving another: the loss of data that occurs when the string copied from src to dst is truncated because it exceeds size. ...
At the very least, (silent) data loss is undesirable to the user of the program. At the worst, truncated data can lead to security issues that may be as problematic as buffer overruns, albeit probably harder to exploit. (One of the nicer features of strlcpy() and strlcat() is that their return values do at least facilitate the detection of truncation—if the programmer checks the return values.)
All of which brings us full circle: to avoid unhappy users and security exploits, in the general case even a call to strlcpy() (or strlcat()) must be guarded by an if statement checking the arguments, if the state of the arguments can't be predicted with certainty in advance of the call.
In other words,strlcpy
is trying to avoid an overrun, but it treats overrun conditions as just part of the normal flow.By contrast,
strcpy_s
and the other_s
variants fail fast, by default aborting the process. Their position is that this is a case that should not occur, and the process should not be allowed to continue because there is no way for thestrcpy
function to behave in a correct manner. I am completely behind this decision.
-
Agreed there, I was comparing
strlcpy
to the earlier posters bringing upstrncpy
-
Ah, I see; more of a "
strlcpy
is the proper version ofstrncpy
", not "strlcpy
is the proper version ofstrcpy_s
"
-
-
-
So it's hilarious as long as it's the husband being abused?
I guess it could be funny the other way round...
... but I'm not taking that chance.
it's a really big skillet!
Filed under: this thread is sexist, if I'm a member of the patriarchy, why do I have a boring dead-end DBA job?
Status: Writing cool Stored Procedure to make my life easier the next time junk breaks.
-
Wow.So I just learned something. The_s
string functions are incorporated into a C11 annex. (I don't know if this means they're "officially" part of the standard, whatever that means.) However, the behavior on error is different, and they're no longer fail-fast. Instead, if they would overflow a buffer, they just set that buffer to the empty string.So way to go C standards committee.. take an established and competently-defined API, then "standardize" a broken version of it with the same name. I guess that's why they pay you guys the big bucks.Never mind, the standard just specified the MS behavior in a different place.
-
Why are they needed?
Linker bollocks, I buttume.
This.
librtutility.so
isdlopen()
ed withRTLD_NOW
(go through the whole lot and barf on any missing dependencies before loading.) Linking toinitrode
introduces 'world+dog
' (which uses stuff in jira) and 'kitchen_sink
' (moxa) both of which I don't need but have no option but to include for the other stuff I do need.Breaking
initrode
into separate libraries would be the correct solution, but would directly impact too many other programs and I don't have the time to sort it out...
-
So it's hilarious as long as it's the husband being abused?
1970‘s TV sitcoms taught you what? Nothing?
-
-
-
Status: my feature work is done for this week, and it's lunchtime Wednesday. Bug fixin' time.
-
@Luhmann said:
@RaceProUK said:
Vauxhall
Opel in the normal world
[...] in North America.
The Netherlands/Belgium are in North America? Or is it called Vauxhall over in the US too?
-
Status: Replaying Deus Ex. Currently on the first visit to Hell's Kitchen.
-
Neither Vauxhall nor Opel presently exist in the US.
Their products, if available, are randomly distributed between the other GM brands.
The Corsa ain't.
-
They're having problems with that today for some reason. Append ?l=english to fix
-
It was Spanish for me. There's also a menu in the top right that lets you change the language.
-
Actually the top bar got cut off for me at one point.
-
-
Why would GM name their cars after something European in the US?!
-
Why does Volkswagen name half their cars after sports, only to then switch to one named after a wind, and the just completely lose the plot and starts using random shit?
Fuck knows, that's why.
-
The Netherlands/■■■■■■■ are in North America?
Yes. That is exactly what I meant. You are extremely perceptive.
-
The Vauxhall brand is only used in the UK
-
██████████████████████████████████ Withered ██████████████████████████████████
█ █
█ Your settlement has crumbled to its end. █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█████████████████████████████████████████████████████████████████████████████REC
-
Status: Discourse has colored text!
RAINBOWS!
-
Thy browser be broked, sir.
-
Either way, neither of our browsers can show that without gaps between the tiles of the border, so it's not really useful to try to post screenshots using text. Back to images, then.
-
Waitaminute... How the hell did I manage to screenshot your post with "1 Reply" button there if I took the screenshot before posting my reply?
-
Hmmm... testing something...
Ok, I broke the Universe again, brb...
AND NOW I CAN'T SAVE MY EDIT!
Wha... but... just. %$@#^%^$#%@$
-
Waitaminute... How the hell did I manage to screenshot your post with "1 Reply" button there if I took the screenshot before posting my reply?
Because the "1 reply" is not thine.
Filed Under: Check your work
-
-
-
Discourse not saving my edit was genuine though.
It was probably a rebake because of the image; I've lost edits that way before.
-
I think that box accepts topic IDs.
!LikeBot ! Wrong Discourse
edit: bug!
-
The draft got saved though. So at least something worked.
-
!LikeBot, @riking is Doing it Wrong!
-
@tar Is Doing It Wrong™
-
!LikeBot ? Wrong
-
@tar is Doing It Wrong™
-
!LikeBot ? Wrong
-
@LikeBot is Doing It Wrong™
-
!LikeBot ? Wrong ben_lubar