X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tools%2Fprotoparse.h;h=b17f2180059a95f6214145be521de3b95bcc09fd;hb=57b1b785f03fda360249de78ad63e110e76adedc;hp=7acd63a82858ab0ac7adc04760bbb117411d83ab;hpb=1fe8d40ebdb232ab6be27af1a3b94a2869cc3779;p=ia32rtools.git diff --git a/tools/protoparse.h b/tools/protoparse.h index 7acd63a..b17f218 100644 --- a/tools/protoparse.h +++ b/tools/protoparse.h @@ -33,7 +33,7 @@ struct parsed_proto { struct parsed_type ret_type; struct parsed_type type; }; - struct parsed_proto_arg arg[16]; + struct parsed_proto_arg arg[32]; int argc; int argc_stack; int argc_reg; @@ -216,6 +216,7 @@ static const char *known_ptr_types[] = { "HRSRC", "HKEY", "HMENU", + "HMONITOR", "HWAVEOUT", "HWND", "PAPPBARDATA", @@ -238,6 +239,8 @@ static const char *known_ptr_types[] = { "REFCLSID", "REFGUID", "REFIID", + "SC_HANDLE", + "SERVICE_STATUS_HANDLE", "HOOKPROC", "DLGPROC", "TIMERPROC", @@ -638,6 +641,12 @@ static int parse_protostr(char *protostr, struct parsed_proto *pp) return -1; } + if (xarg >= ARRAY_SIZE(pp->arg)) { + printf("%s:%d:%zd: too many args\n", + hdrfn, hdrfline, (p - protostr) + 1); + return -1; + } + arg = &pp->arg[xarg]; xarg++;