Skip to content

Instantly share code, notes, and snippets.

View JensAyton's full-sized avatar

Jens Ayton JensAyton

View GitHub Profile
@JensAyton
JensAyton / oops.c
Last active August 29, 2015 13:56 — forked from davepeck/oops.c
One example of cleanup without using goto. (This isn't an opinion on what Apple “should have” done, it’s just an answer to a specific question on Twitter. It would have done nothing to avoid the actual bug.) I also removed the unused variable “signedHashes”.
static OSStatus
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams,
uint8_t *signature, UInt16 signatureLen)
{
SSLBuffer hashCtx;
hashCtx.date = 0;
OSStatus err = SSLVerifySignedServerKeyExchangeInner(ctx, isRsa, signedParams, signature, signatureLen, &hashCtx);
SSLFreeBuffer(hashCtx);
@JensAyton
JensAyton / objc_dep.py
Created January 6, 2011 22:03
Header dependency mapper for Objective-C. This fork randomly colours arcs, for better tracing of spaghetti.
#!/usr/bin/python
# Nicolas Seriot
# 2011-01-06
# http://github.com/nst/objc_dep
"""
Input: path of an Objective-C project
Output: import dependancies Graphviz format