build-redis-from-scratch
build-redis-from-scratch copied to clipboard
### Code [here](https://github.com/ahmedash95/build-redis-from-scratch/blob/e871f78108361e0af10a28b37583dbaec5a7cef8/handler.go#L117) ``` HSETsMu.RLock() value, ok := HSETs[hash] HSETsMu.RUnlock() if !ok { return Value{typ: "null"} } values := []Value{} for k, v := range value { values = append(values,...
### **Description** Reading the length of the array without any upper boundary could lead to large memory allocation without usage. The issue is particularly [here](https://github.com/ahmedash95/build-redis-from-scratch/blob/e871f78108361e0af10a28b37583dbaec5a7cef8/resp.go#L84) and [here](https://github.com/ahmedash95/build-redis-from-scratch/blob/e871f78108361e0af10a28b37583dbaec5a7cef8/resp.go#L109). Also, I can...