commit a77ed65d76c7a9ad255e397169a02cc1256b0f7b from: Omar Polo date: Sun Jan 09 09:30:28 2022 UTC fix two bugs in expect - looking for Terror doesn't make sense, it's Rerror - consume the tag before reading the error string commit - 6658888da36b684c02f27edaf6f7752b9db9a92c commit + a77ed65d76c7a9ad255e397169a02cc1256b0f7b blob - 86e1de297b54b57c3e50b5bef3d7eeed6bcee85d blob + 27c6556d60606fb670041ede82eae61351a49e42 --- ftp.c +++ ftp.c @@ -299,9 +299,12 @@ expect(uint8_t type) if (t == type) return; - if (t == Terror) { + if (t == Rerror) { char *err; + /* skip tag */ + np_read16(buf); + err = np_readstr(buf); errx(1, "expected %s, got error %s", pp_msg_type(type), err);