Skip to content

Instantly share code, notes, and snippets.

View bagder's full-sized avatar
⌨️
mostly typos

Daniel Stenberg bagder

⌨️
mostly typos
View GitHub Profile
@bagder
bagder / newdup.c
Last active October 26, 2016 21:28
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#define INPUT "Rgn02.txt"
#define WIDTH 8 /* 6 bytes + CRLF */
unsigned char there[(2<<15)*16*16*2];
@bagder
bagder / url.c diff
Created December 1, 2016 09:24
curl: reject non-numeric port numbers in URLs
diff --git a/lib/url.c b/lib/url.c
index dd3f62d..48016e2 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -5451,15 +5451,20 @@ static CURLcode parse_remote_port(struct Curl_easy *data,
else if(rest != &portptr[1]) {
*portptr = '\0'; /* cut off the name there */
conn->remote_port = curlx_ultous(port);
}
@bagder
bagder / cookie.patch
Created January 27, 2017 12:01
[PATCH] cookies: do not assume a valid domain has a dot
@bagder
bagder / count-mallocs.c
Created April 22, 2017 17:48
libcurl test app to count mallocs based on multi-double.c
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
@bagder
bagder / test-curl-install.sh
Created August 9, 2017 10:20
Verify make install installs the libcurl docs
#!/bin/sh
./maketgz 7.55.0-test
tar xf curl-7.55.0-test.tar.gz
cd curl-7.55.0-test
./configure --prefix=/tmp/curl-remove
make -sj
make install
ls /tmp/curl-remove/share/man/man3/
@bagder
bagder / report2release.pl
Created August 14, 2017 11:30
calculate number of days from a curl security report until release
#!/usr/bin/perl
# un-preprocessed _changes-file as input
require "./vuln.pm";
sub vernum {
my ($ver)=@_;
my @v = split('\.', $ver);
return ($v[0] << 16) | ($v[1] << 8) | $v[2];
@bagder
bagder / git-authors-active.pl
Last active September 12, 2017 19:41
Extract number of active authors in a git repository at the time of each commit
#!/usr/bin/perl
my @a = `git log --use-mailmap --reverse --pretty=fuller --no-color --date=short --decorate=full | egrep "^(Author|CommitDate):"`;
use Time::Piece;
sub delta {
my ($from, $to) = @_;
my $f = Time::Piece->strptime($from, "%Y-%m-%d");
my $t = Time::Piece->strptime($to, "%Y-%m-%d");
@bagder
bagder / How-To-Test-gw-mac.md
Last active September 11, 2017 09:36
Test gw-mac on windows
@bagder
bagder / build-log.txt
Created September 12, 2017 12:49
Firefox build problems on Windows 7, mozilla-build 3.0, MSVC 2015, github gecko'dev git master
daniel@daniel-win7 e:/win-src/gecko-dev
$ mach build
c:\mozilla-build\mozmake\mozmake.EXE -f client.mk MOZ_PARALLEL_BUILD=6 -s configure
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LANG = "SVE"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Generating e:/win-src/gecko-dev/configure
@bagder
bagder / curl-fresh-checkout-build.sh
Last active September 20, 2017 09:14
fresh curl checkout and build on debian
# install the basics
sudo apt install autoconf automake libtool libssl-dev libssh2-1-dev libz-dev libnghttp2-dev libpsl-dev
mkdir $HOME/src
cd $HOME/src
git clone https://github.com/curl/curl.git
cd curl
./buildconf
./configure --enable-debug --enable-maintainer-mode --disable-shared