xaizek / hstr (License: Apachev2) (since 2018-12-07)
Bash and Zsh shell history suggest box - easily view, navigate, search and manage your command history.
Commit 019805048372adb5b43c1f8b90482d35f639502f

Use strlen instead of sizeof
Author: Ryan Baumann
Author date (UTC): 2015-02-23 17:51
Committer name: Ryan Baumann
Committer date (UTC): 2015-02-23 17:51
Parent(s): d0d346a0945f8b95876bc00b69f488ae025a2168
Signing key:
Tree: 9ec64cab35a0b9141b95c6ab9dc7fb02caf5823d
File Lines added Lines deleted
src/hstr_utils.c 1 1
File src/hstr_utils.c changed (mode: 100644) (index 9a2104e..554c548)
... ... char *get_process_name_by_pid(const int pid)
149 149 char* shell = strrchr(getenv("SHELL"),'/'); char* shell = strrchr(getenv("SHELL"),'/');
150 150 if(shell != NULL){ if(shell != NULL){
151 151 shell++; shell++;
152 strncpy(name,shell,sizeof(char)*sizeof(name));
152 strncpy(name,shell,sizeof(char)*strlen(shell));
153 153 } }
154 154 } }
155 155 return name; return name;
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/hstr

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/hstr

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master