luiserebii / gitid Goto Github PK
View Code? Open in Web Editor NEWA simple, minimal command line tool allowing for easy management of git identities (username, email, and signing key (e.g GPG)).
License: GNU General Public License v3.0
A simple, minimal command line tool allowing for easy management of git identities (username, email, and signing key (e.g GPG)).
License: GNU General Public License v3.0
gitid
, up until the current release (and latest commit), has assumed a 1000 character limit on the user, email, and signing key fields. To protect against overwriting the buffers, safestrcpy
and safestrcat
have been written to define a hard limit. Even runcmd
, a function intended to retrieve output from a command, follows this philosophy:
Lines 33 to 53 in df1e97d
Although the application is prepared to handle these scenarios, they are assumed as accidents, as I had not investigated how long git actually allowed the configurations to be. After building and running the program through gdb, I can safely say that it reads into a kind of dynamically-sized string buffer. The core function is the static get_value
: https://github.com/git/git/blob/v2.26.0/config.c#L597 which reads into a string buffer of size_t
: https://github.com/git/git/blob/v2.26.0/strbuf.h#L66
The solution here, is to migrate our stack buffers to a dynamically-sized one. There is a string type in C-STL we can use and integrate, although it needs some more work to make it complete.
The best next course of action is to identify the substitutions, get a general idea of the functions needed, develop them, test them, and implement. Success should result in a minor version bump to v0.3.0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.